summary refs log tree commit diff
path: root/pkgs/stdenv/generic
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-02-09 17:04:18 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-02-09 17:04:18 +0000
commit07bc3fbf002a802c5e0c57c9700c4c8b693ff212 (patch)
treebc6b7594a3de4b53fd7e23181d6fd709e938ac4e /pkgs/stdenv/generic
parent29c64c6c6768ea1594a85d1544ee9c64a16d534e (diff)
downloadnixlib-07bc3fbf002a802c5e0c57c9700c4c8b693ff212.tar
nixlib-07bc3fbf002a802c5e0c57c9700c4c8b693ff212.tar.gz
nixlib-07bc3fbf002a802c5e0c57c9700c4c8b693ff212.tar.bz2
nixlib-07bc3fbf002a802c5e0c57c9700c4c8b693ff212.tar.lz
nixlib-07bc3fbf002a802c5e0c57c9700c4c8b693ff212.tar.xz
nixlib-07bc3fbf002a802c5e0c57c9700c4c8b693ff212.tar.zst
nixlib-07bc3fbf002a802c5e0c57c9700c4c8b693ff212.zip
* Push packages from the final stdenv bootstrapping phase to
  all-packages.  That is, an attribute like "bash" in all-packages.nix
  should evaluate to the "bash" used to build stdenv, it shouldn't
  build a new one.

  Hm, this would be a lot cleaner if we had lazy_rec ;-)

svn path=/nixpkgs/branches/usability/; revision=4775
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r--pkgs/stdenv/generic/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix
index b25703eb9af4..5bb63f1b815d 100644
--- a/pkgs/stdenv/generic/default.nix
+++ b/pkgs/stdenv/generic/default.nix
@@ -1,5 +1,6 @@
 { stdenv, name, preHook ? null, postHook ? null, initialPath, gcc, shell
 , param1 ? "", param2 ? "", param3 ? "", param4 ? "", param5 ? ""
+, extraAttrs ? {}
 }:
 
 let {
@@ -24,6 +25,7 @@ let {
     # Add a utility function to produce derivations that use this
     # stdenv and its shell.
     // {
+    
       mkDerivation = attrs: derivation (attrs // {
         builder = if attrs ? realBuilder then attrs.realBuilder else shell;
         args = if attrs ? args then attrs.args else
@@ -31,6 +33,13 @@ let {
         stdenv = body;
         system = body.system;
       });
-    };
+
+    }
+
+    # Propagate any extra attributes.  For instance, we use this to
+    # "lift" packages like curl from the final stdenv for Linux to
+    # all-packages.nix for that platform (meaning that it has a line
+    # like curl = if stdenv ? curl then stdenv.curl else ...).
+    // extraAttrs;
 
 }