A small function not unlike symlinkJoin.

svn path=/nixpkgs/trunk/; revision=12641

+4
+4
pkgs/top-level/all-packages.nix
··· 404 405 symlinkJoin = name: paths: runCommand name {inherit paths;} "mkdir -p $out; for i in $paths; do ${xorg.lndir}/bin/lndir $i $out; done"; 406 407 substituteAll = import ../build-support/substitute/substitute-all.nix { 408 inherit stdenv; 409 };
··· 404 405 symlinkJoin = name: paths: runCommand name {inherit paths;} "mkdir -p $out; for i in $paths; do ${xorg.lndir}/bin/lndir $i $out; done"; 406 407 + # entries is a list of attribute sets like { name = "name" ; path = "/nix/store/..."; } 408 + linkFarm = name: entries: runCommand name {} ("mkdir -p $out; cd $out; \n" + 409 + (lib.concatMapStrings (x: "ln -s '${x.path}' '${x.name}';\n") entries)); 410 + 411 substituteAll = import ../build-support/substitute/substitute-all.nix { 412 inherit stdenv; 413 };