diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 1c9e7fc49f28..6a983c7ae017 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)); + }