src-only: pass all arguments
This allows executing postPatch and other hooks correctly
This commit is contained in:
parent
465d355e5b
commit
fb94bb0b20
1 changed files with 8 additions and 20 deletions
|
@ -7,25 +7,13 @@
|
|||
#
|
||||
# > srcOnly pkgs.hello
|
||||
#
|
||||
{ name
|
||||
, src
|
||||
, stdenv ? orig.stdenv
|
||||
, patches ? []
|
||||
, # deprecated, use the nativeBuildInputs
|
||||
buildInputs ? []
|
||||
, # used to pass extra unpackers
|
||||
nativeBuildInputs ? []
|
||||
, # needed when passing an existing derivation
|
||||
...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
inherit
|
||||
buildInputs
|
||||
name
|
||||
nativeBuildInputs
|
||||
patches
|
||||
src
|
||||
;
|
||||
attrs:
|
||||
let
|
||||
args = if builtins.hasAttr "drvAttrs" attrs then attrs.drvAttrs else attrs;
|
||||
name = if builtins.hasAttr "name" args then args.name else "${args.pname}-${args.version}";
|
||||
in
|
||||
stdenv.mkDerivation (args // {
|
||||
name = "${name}-source";
|
||||
installPhase = "cp -r . $out";
|
||||
phases = ["unpackPhase" "patchPhase" "installPhase"];
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue