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:
zimbatm 2020-04-23 11:44:55 +02:00
parent bbbc419186
commit 31ead7d030
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7

View file

@ -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"];
}