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 "") + ''