fetchCargoTarball: allow adding nativeBuildInputs

This commit is contained in:
Artturin 2022-05-28 21:55:39 +03:00
parent 36ad5b9b96
commit 9ca1379bdf

View file

@ -23,6 +23,7 @@ in
, patches ? []
, sourceRoot ? ""
, cargoUpdateHook ? ""
, nativeBuildInputs ? []
, ...
} @ args:
@ -32,7 +33,7 @@ let hash_ =
else throw "fetchCargoTarball requires a hash for ${name}";
in stdenv.mkDerivation ({
name = "${name}-vendor.tar.gz";
nativeBuildInputs = [ cacert git cargo-vendor-normalise cargo ];
nativeBuildInputs = [ cacert git cargo-vendor-normalise cargo ] ++ nativeBuildInputs;
buildPhase = ''
runHook preBuild
@ -82,5 +83,5 @@ in stdenv.mkDerivation ({
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
} // (builtins.removeAttrs args [
"name" "sha256" "cargoUpdateHook"
"name" "sha256" "cargoUpdateHook" "nativeBuildInputs"
]))