summary refs log tree commit diff
path: root/pkgs/stdenv/linux/default.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-08-23 16:18:02 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-08-23 16:18:02 +0000
commita177a9ac7caddf08d7a1ed667174c1b43a97b186 (patch)
treea0a1ffe75a4a59bca6ee73841fe9e03c1ce33f55 /pkgs/stdenv/linux/default.nix
parent3f49e29b0a36a5e645197ff0b0a70cd64fc292cd (diff)
* When calling all-packages.nix, pass system explicitly and don't rely
  on __currentSystem being "i686-linux", because we might not be on
  "i686-linux".

svn path=/nixpkgs/trunk/; revision=6218
Diffstat (limited to 'pkgs/stdenv/linux/default.nix')
-rw-r--r--pkgs/stdenv/linux/default.nix17
1 files changed, 10 insertions, 7 deletions
diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix
index d6c9b80f25e6d..a15cd30157fe4 100644
--- a/pkgs/stdenv/linux/default.nix
+++ b/pkgs/stdenv/linux/default.nix
@@ -8,6 +8,9 @@
 
 rec {
 
+  system = "i686-linux";
+
+
   # The bootstrap process proceeds in several steps.
 
   # 1) Create a standard environment by downloading pre-built
@@ -22,16 +25,15 @@ rec {
     bunzip2 = ./tools/bunzip2;
     cp = ./tools/cp;
     curl = ./tools/curl-7.15.1-static.tar.bz2;
-    system = "i686-linux";
+    inherit system;
     args = [ ./scripts/unpack-curl.sh ];
   };
 
   # This function downloads a file.
   download = {url, md5, pkgname}: derivation {
     name = baseNameOf (toString url);
-    system = "i686-linux";
     builder = ./tools/bash;
-    inherit curl url;
+    inherit system curl url;
     args = [ ./scripts/download.sh ];
 
     # Nix 0.8 fixed-output derivations.
@@ -49,14 +51,13 @@ rec {
   , extra3 ? null, extra4? null, patchelf ? null}:
   derivation {
     name = pkgname;
-    system = "i686-linux";
     builder = ./tools/bash;
     tar = ./tools/tar;
     bunzip2 = ./tools/bunzip2;
     cp = ./tools/cp;
     args = [ ./scripts/unpack.sh ];
     tarball = download {inherit url md5 pkgname;};
-    inherit postProcess addToPath extra extra2 extra3 extra4 patchelf;
+    inherit system postProcess addToPath extra extra2 extra3 extra4 patchelf;
   };
 
   # The various statically linked components that make up the standard
@@ -107,10 +108,9 @@ rec {
   stdenvInitial = let {
     body = derivation {
       name = "stdenv-linux-initial";
-      system = "i686-linux";
       builder = ./tools/bash;
       args = ./scripts/builder-stdenv-initial.sh;
-      inherit staticTools;
+      inherit system staticTools;
     }  // {
       mkDerivation = attrs: derivation ((removeAttrs attrs ["meta"]) // {
         builder = ./tools/bash;
@@ -154,6 +154,7 @@ rec {
   # 2) These are the packages that we can build with the first
   #    stdenv.  We only need Glibc (in step 3).
   stdenvLinuxBoot1Pkgs = allPackages {
+    inherit system;
     bootStdenv = stdenvLinuxBoot1;
   };
 
@@ -172,6 +173,7 @@ rec {
 
   # 5) The packages that can be built using the second stdenv.
   stdenvLinuxBoot2Pkgs = allPackages {
+    inherit system;
     bootStdenv = stdenvLinuxBoot2;
   };
 
@@ -190,6 +192,7 @@ rec {
 
   # 7) The packages that can be built using the third stdenv.
   stdenvLinuxBoot3Pkgs = allPackages {
+    inherit system;
     bootStdenv = stdenvLinuxBoot3;
   };