diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-05-20 01:39:43 +0200 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-05-20 01:39:43 +0200 |
commit | 1849de11ec1e32e9eebb83f24d5339bea88b7ed7 (patch) | |
tree | 0aaf3cead09c2d55c67c6f6a86ad20af399797d8 /nixpkgs/pkgs/build-support/src-only/default.nix | |
parent | 304c06d7a7ea3f5c84031d325ece8d38b8c1d829 (diff) | |
parent | 0f5ce2fac0c726036ca69a5524c59a49e2973dd4 (diff) |
Merge commit '0f5ce2fac0c726036ca69a5524c59a49e2973dd4'
Diffstat (limited to 'nixpkgs/pkgs/build-support/src-only/default.nix')
-rw-r--r-- | nixpkgs/pkgs/build-support/src-only/default.nix | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/build-support/src-only/default.nix b/nixpkgs/pkgs/build-support/src-only/default.nix index c2f7cfb9399..c721fdf40c6 100644 --- a/nixpkgs/pkgs/build-support/src-only/default.nix +++ b/nixpkgs/pkgs/build-support/src-only/default.nix @@ -1,6 +1,31 @@ -{ stdenv, name, src, patches ? [], buildInputs ? [] }: +{ 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 ? [] +, # 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"]; } |