diff options
author | zimbatm <zimbatm@zimbatm.com> | 2020-04-23 11:44:55 +0200 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2020-04-27 14:31:40 +0200 |
commit | 31ead7d030b235fcbb7b6a6d92600f23702c7505 (patch) | |
tree | a9a2d80c6f700c8da2a0b02b9fd9c6020b7580da /pkgs/build-support/src-only | |
parent | bbbc41918634c2388f1fd39db1c8f162e3ab4b95 (diff) |
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.
Diffstat (limited to 'pkgs/build-support/src-only')
-rw-r--r-- | pkgs/build-support/src-only/default.nix | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/build-support/src-only/default.nix b/pkgs/build-support/src-only/default.nix index 8ca262a998b2..c721fdf40c69 100644 --- a/pkgs/build-support/src-only/default.nix +++ b/pkgs/build-support/src-only/default.nix @@ -11,11 +11,21 @@ , src , stdenv ? orig.stdenv , patches ? [] -, buildInputs ? [] -, ... # needed when passing an existing derivation +, # deprecated, use the nativeBuildInputs + buildInputs ? [] +, # used to pass extra unpackers + nativeBuildInputs ? [] +, # needed when passing an existing derivation + ... }: stdenv.mkDerivation { - inherit src buildInputs patches name; + inherit + buildInputs + name + nativeBuildInputs + patches + src + ; installPhase = "cp -r . $out"; phases = ["unpackPhase" "patchPhase" "installPhase"]; } |