From e99acbff72f2c258fb82e036d21e870a36da2c52 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 23 Nov 2009 19:18:53 +0000 Subject: Restore linkFarm trivial builder svn path=/nixpkgs/trunk/; revision=18566 --- pkgs/build-support/trivial-builders.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkgs') 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)); + } -- cgit 1.4.1