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 <contact@scrumplex.net>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user