Unverified Commit 63cdea53 authored by Sefa Eyeoglu's avatar Sefa Eyeoglu
Browse files

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: default avatarSefa Eyeoglu <contact@scrumplex.net>
parent e7dd455b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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