Restore linkFarm trivial builder

svn path=/nixpkgs/trunk/; revision=18566
This commit is contained in:
Michael Raskin 2009-11-23 19:18:53 +00:00
parent bbd6e56d69
commit e99acbff72

View File

@ -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));
}