summary refs log tree commit diff
path: root/pkgs/build-support/src-only/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/src-only/default.nix')
-rw-r--r--pkgs/build-support/src-only/default.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/build-support/src-only/default.nix b/pkgs/build-support/src-only/default.nix
index a93b3648090..8ca262a998b 100644
--- a/pkgs/build-support/src-only/default.nix
+++ b/pkgs/build-support/src-only/default.nix
@@ -1,4 +1,19 @@
-{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 ? []
+, buildInputs ? []
+, ... # needed when passing an existing derivation
+}:
 stdenv.mkDerivation {
   inherit src buildInputs patches name;
   installPhase = "cp -r . $out";