summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/build-support/trivial-builders.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix
index 1c9e7fc49f2..6a983c7ae01 100644
--- a/pkgs/build-support/trivial-builders.nix
+++ b/pkgs/build-support/trivial-builders.nix
@@ -68,4 +68,9 @@ rec {
       done < graph
     '';
 
+  # Quickly create a set of symlinks to derivations.
+  # entries is a list of attribute sets like { name = "name" ; path = "/nix/store/..."; }
+  linkFarm = name: entries: runCommand name {} ("mkdir -p $out; cd $out; \n" +
+    (lib.concatMapStrings (x: "ln -s '${x.path}' '${x.name}';\n") entries));
+
 }