A small function not unlike symlinkJoin.

svn path=/nixpkgs/trunk/; revision=12641
This commit is contained in:
Michael Raskin 2008-08-16 18:48:50 +00:00
parent 813c7e87f6
commit 1e33a71c90

View File

@ -404,6 +404,10 @@ let pkgs = rec {
symlinkJoin = name: paths: runCommand name {inherit paths;} "mkdir -p $out; for i in $paths; do ${xorg.lndir}/bin/lndir $i $out; done";
# 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));
substituteAll = import ../build-support/substitute/substitute-all.nix {
inherit stdenv;
};