From 63cdea53595d89771ea544783ef89dbeb414094b Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Mon, 15 Dec 2025 14:51:18 +0100 Subject: [PATCH] fetchPnpmDeps: allow passing existing derivation args Previously, users had to add hacks to add additional nativeBuildInputs entries to the fetcher. This way we allow users to append nativeBuildInputs, impureEnvVars and also merge potential passthru attributes. This might cause rebuilds. Signed-off-by: Sefa Eyeoglu --- pkgs/build-support/node/fetch-pnpm-deps/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/node/fetch-pnpm-deps/default.nix b/pkgs/build-support/node/fetch-pnpm-deps/default.nix index d3ce1787aac4..c55b9091b622 100644 --- a/pkgs/build-support/node/fetch-pnpm-deps/default.nix +++ b/pkgs/build-support/node/fetch-pnpm-deps/default.nix @@ -74,9 +74,11 @@ in pnpm # from args yq zstd - ]; + ] + ++ args.nativeBuildInputs or [ ]; - impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [ "NIX_NPM_REGISTRY" ]; + impureEnvVars = + lib.fetchers.proxyImpureEnvVars ++ [ "NIX_NPM_REGISTRY" ] ++ args.impureEnvVars or [ ]; installPhase = '' runHook preInstall @@ -172,7 +174,7 @@ in runHook postFixup ''; - passthru = { + passthru = args.passthru or { } // { inherit fetcherVersion; serve = callPackage ./serve.nix { inherit pnpm; # from args