2020-04-22 09:48:05 +02:00
|
|
|
{ stdenv }@orig:
|
|
|
|
# srcOnly is a utility builder that only fetches and unpacks the given `src`,
|
|
|
|
# maybe pathings it in the process with the optional `patches` and
|
|
|
|
# `buildInputs` attributes.
|
|
|
|
#
|
|
|
|
# It can be invoked directly, or be used to wrap an existing derivation. Eg:
|
|
|
|
#
|
|
|
|
# > srcOnly pkgs.hello
|
|
|
|
#
|
|
|
|
{ name
|
|
|
|
, src
|
|
|
|
, stdenv ? orig.stdenv
|
|
|
|
, patches ? []
|
2020-04-23 11:44:55 +02:00
|
|
|
, # deprecated, use the nativeBuildInputs
|
|
|
|
buildInputs ? []
|
|
|
|
, # used to pass extra unpackers
|
|
|
|
nativeBuildInputs ? []
|
|
|
|
, # needed when passing an existing derivation
|
|
|
|
...
|
2020-04-22 09:48:05 +02:00
|
|
|
}:
|
2008-10-01 17:57:22 +02:00
|
|
|
stdenv.mkDerivation {
|
2020-04-23 11:44:55 +02:00
|
|
|
inherit
|
|
|
|
buildInputs
|
|
|
|
name
|
|
|
|
nativeBuildInputs
|
|
|
|
patches
|
|
|
|
src
|
|
|
|
;
|
2008-10-01 17:57:22 +02:00
|
|
|
installPhase = "cp -r . $out";
|
|
|
|
phases = ["unpackPhase" "patchPhase" "installPhase"];
|
|
|
|
}
|