From bedeb5bb275a9de61c26db998f33630f7c56556e Mon Sep 17 00:00:00 2001 From: Defelo Date: Wed, 13 Aug 2025 12:18:26 +0200 Subject: [PATCH 1/2] zipline: prune node_modules This reduces the closure size from 3.7 GiB to 2.4 GiB. --- pkgs/by-name/zi/zipline/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/zi/zipline/package.nix b/pkgs/by-name/zi/zipline/package.nix index dbc471813148e..cd8d868bc2a5b 100644 --- a/pkgs/by-name/zi/zipline/package.nix +++ b/pkgs/by-name/zi/zipline/package.nix @@ -85,6 +85,9 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall + pnpm prune --prod + find node_modules -xtype l -delete + mkdir -p $out/{bin,share/zipline} cp -r build generated node_modules prisma .next mimes.json code.json package.json $out/share/zipline From ed4ce1954409aff79aa10a03f61813ae5a6f6957 Mon Sep 17 00:00:00 2001 From: Defelo Date: Fri, 8 Aug 2025 15:04:13 +0000 Subject: [PATCH 2/2] zipline: 4.2.1 -> 4.2.3 Changelog: https://github.com/diced/zipline/releases/tag/v4.2.2 Diff: https://github.com/diced/zipline/compare/v4.2.1...v4.2.2 Changelog: https://github.com/diced/zipline/releases/tag/v4.2.3 Diff: https://github.com/diced/zipline/compare/v4.2.2...v4.2.3 --- nixos/modules/services/web-apps/zipline.nix | 1 + pkgs/by-name/zi/zipline/package.nix | 24 +++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/web-apps/zipline.nix b/nixos/modules/services/web-apps/zipline.nix index 397aeff780587..45cf4704e4c39 100644 --- a/nixos/modules/services/web-apps/zipline.nix +++ b/nixos/modules/services/web-apps/zipline.nix @@ -135,6 +135,7 @@ in "@system-service" "~@privileged" "~@resources" + "@chown" ]; UMask = "0077"; }; diff --git a/pkgs/by-name/zi/zipline/package.nix b/pkgs/by-name/zi/zipline/package.nix index cd8d868bc2a5b..c215bfe4dbab9 100644 --- a/pkgs/by-name/zi/zipline/package.nix +++ b/pkgs/by-name/zi/zipline/package.nix @@ -28,17 +28,33 @@ let PRISMA_INTROSPECTION_ENGINE_BINARY = lib.getExe' prisma-engines "introspection-engine"; PRISMA_FMT_BINARY = lib.getExe' prisma-engines "prisma-fmt"; }; + + vips' = vips.overrideAttrs ( + finalAttrs: prevAttrs: { + version = "8.17.1"; + src = fetchFromGitHub { + inherit (prevAttrs.src) owner repo; + tag = "v${finalAttrs.version}"; + hash = "sha256-Sc2BWdQIgL/dI0zfbEQVCs3+1QBrLE7BsE3uFHe9C/c="; + postFetch = '' + rm -r $out/test/test-suite/images/ + ''; + }; + outputs = lib.remove "devdoc" prevAttrs.outputs; + mesonFlags = lib.remove (lib.mesonBool "gtk_doc" true) prevAttrs.mesonFlags; + } + ); in stdenv.mkDerivation (finalAttrs: { pname = "zipline"; - version = "4.2.1"; + version = "4.2.3"; src = fetchFromGitHub { owner = "diced"; repo = "zipline"; tag = "v${finalAttrs.version}"; - hash = "sha256-16D44QQHrXn6y+3IRsWh6iHSr+o4l3zHDW7SOFMsHnc="; + hash = "sha256-WyL/ItY/hvmBDRBB063QAIATPT51bPChkFKH7i32sz0="; leaveDotGit = true; postFetch = '' git -C $out rev-parse --short HEAD > $out/.git_head @@ -49,12 +65,12 @@ stdenv.mkDerivation (finalAttrs: { pnpmDeps = pnpm_10.fetchDeps { inherit (finalAttrs) pname version src; fetcherVersion = 1; - hash = "sha256-kIneqtLPZ29PzluKUGO4XbQYHbNddu0kTfoP4C22k7U="; + hash = "sha256-LDLcde+p0wjy1BddiNxJwFLS/7O9jGpMNapojZIipeA="; }; buildInputs = [ openssl - vips + vips' ]; nativeBuildInputs = [