srcOnly: rename buildInputs to nativeBuildInputs
The only reason to pass build inputs is to extend the unpackPhase with custom unpack commands. Eg: add "unrar" to unpack rar sources. And those should really be passed as native build inputs. Why? Because nativeBuildInputs is for dependencies that are used at build time but will not propagate as runtime dependencies. And also, cross-compilation.
This commit is contained in:
parent
bbbc419186
commit
31ead7d030
|
@ -11,11 +11,21 @@
|
||||||
, src
|
, src
|
||||||
, stdenv ? orig.stdenv
|
, stdenv ? orig.stdenv
|
||||||
, patches ? []
|
, patches ? []
|
||||||
, buildInputs ? []
|
, # deprecated, use the nativeBuildInputs
|
||||||
, ... # needed when passing an existing derivation
|
buildInputs ? []
|
||||||
|
, # used to pass extra unpackers
|
||||||
|
nativeBuildInputs ? []
|
||||||
|
, # needed when passing an existing derivation
|
||||||
|
...
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit src buildInputs patches name;
|
inherit
|
||||||
|
buildInputs
|
||||||
|
name
|
||||||
|
nativeBuildInputs
|
||||||
|
patches
|
||||||
|
src
|
||||||
|
;
|
||||||
installPhase = "cp -r . $out";
|
installPhase = "cp -r . $out";
|
||||||
phases = ["unpackPhase" "patchPhase" "installPhase"];
|
phases = ["unpackPhase" "patchPhase" "installPhase"];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user