From 4a047cb3be3d61f89f18b8584da2aa474868c885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20K=C3=B6nig?= Date: Wed, 28 Oct 2026 18:49:12 +0100 Subject: [PATCH] fix(n8n): disable pnpm minimumReleaseAge check for offline prune n8n >= 2.45 sets `minimumReleaseAge: 2880` in pnpm-workspace.yaml. pnpm 12 enforces that supply-chain policy on `pnpm prune --prod` (preInstall) by fetching registry metadata for every lockfile entry, which hangs the build in the network-less sandbox. Disable the check for prune and force --offline so future registry access fails fast instead of stalling. Co-Authored-By: Claude Opus 5.5 --- overlays/mods/n8n.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/overlays/mods/n8n.nix b/overlays/mods/n8n.nix index 1438237..a944b3a 100644 --- a/overlays/mods/n8n.nix +++ b/overlays/mods/n8n.nix @@ -69,6 +69,20 @@ in else x) previousAttrs.nativeBuildInputs; + # Upstream preInstall runs `pnpm prune --prod`. n8n >= 2.45 sets + # `minimumReleaseAge: 2880` in pnpm-workspace.yaml, and pnpm 12 enforces + # that supply-chain policy on prune by fetching registry metadata for every + # lockfile entry. In the network-less sandbox that stalls the build + # indefinitely right after "Removing non-deterministic and unnecessary + # files". The lockfile is fixed by pnpmDeps' hash anyway, so disable the + # check for prune and force --offline so any future registry access fails + # fast instead of hanging. + preInstall = + builtins.replaceStrings + ["CI=true pnpm --ignore-scripts prune --prod -w"] + ["CI=true pnpm --ignore-scripts --offline --config.minimum-release-age=0 prune --prod -w"] + previousAttrs.preInstall; + preBuild = (previousAttrs.preBuild or "") + ''