summary refs log tree commit diff
path: root/pkgs/build-support/buildenv/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-11-28 16:46:12 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-11-28 16:46:12 +0000
commit153d4e65a1c4ed37877c4db982727d89df15ea82 (patch)
tree065bac3336ce69974796a24fd18cc080f5e4eb92 /pkgs/build-support/buildenv/default.nix
parent89ba1cba24202f2ca65ae482359b39aee6c8ba97 (diff)
downloadnixlib-153d4e65a1c4ed37877c4db982727d89df15ea82.tar
nixlib-153d4e65a1c4ed37877c4db982727d89df15ea82.tar.gz
nixlib-153d4e65a1c4ed37877c4db982727d89df15ea82.tar.bz2
nixlib-153d4e65a1c4ed37877c4db982727d89df15ea82.tar.lz
nixlib-153d4e65a1c4ed37877c4db982727d89df15ea82.tar.xz
nixlib-153d4e65a1c4ed37877c4db982727d89df15ea82.tar.zst
nixlib-153d4e65a1c4ed37877c4db982727d89df15ea82.zip
* Fork of build-env in the Nix distribution. This one supports
  ignoring collisions and selectively including directories.

svn path=/nixpkgs/trunk/; revision=7160
Diffstat (limited to 'pkgs/build-support/buildenv/default.nix')
-rw-r--r--pkgs/build-support/buildenv/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/build-support/buildenv/default.nix b/pkgs/build-support/buildenv/default.nix
new file mode 100644
index 000000000000..9f150d8bda20
--- /dev/null
+++ b/pkgs/build-support/buildenv/default.nix
@@ -0,0 +1,29 @@
+# buildEnv creates a tree of symlinks to the specified paths.  This is
+# a fork of the buildEnv in the Nix distribution.  Most changes should
+# eventually be merged back into the Nix distribution.
+
+{stdenv, perl}:
+
+{ name
+
+, # The manifest file (if any).  A symlink $out/manifest will be
+  # created to it.
+  manifest ? ""
+  
+, # The paths to symlink.
+  paths
+  
+, # Whether to ignore collisions or abort.
+  ignoreCollisions ? false
+
+, # The paths (relative to each element of `paths') that we want to
+  # symlink (e.g., ["/bin"]).  Any file not inside any of the
+  # directories in the list is not symlinked.
+  pathsToLink ? ["/"]
+}:
+
+stdenv.mkDerivation {
+  inherit name manifest paths ignoreCollisions pathsToLink;
+  realBuilder = perl + "/bin/perl";
+  args = ["-w" ./builder.pl];
+}