summary refs log tree commit diff
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-07 20:03:42 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-07 20:03:42 +0000
commit99e776e6650b351e4992079cb72f5ad6664c3be2 (patch)
treec5383fc895c3b843c642676cd926c620e2def234
parented09bc1fec37ec74b349c6e2f61e7471104eb875 (diff)
Changing a bit the usage of 'platform' along the kernel, and expecting it to be backups/stdenv-updates@18281
overrided by pkgOverrides on desire.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18267
-rw-r--r--pkgs/os-specific/linux/kernel/generic.nix8
-rw-r--r--pkgs/top-level/all-packages.nix6
2 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index 8a0c1820717cb..31af236ffae6e 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -37,15 +37,13 @@
 
 , preConfigure ? ""
 , extraMeta ? {}
-, uboot ? null
+, platform ? { uboot = null; }
 , ...
 }:
 
 assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
   || stdenv.system == "armv5tel-linux";
 
-assert stdenv.system == "armv5tel-linux" -> uboot != null;
-
 let
 
   lib = stdenv.lib;
@@ -76,7 +74,7 @@ stdenv.mkDerivation {
     in lib.concatStrings (addNewlines (configFromPatches ++ extraConfig));
 
   buildInputs = [perl mktemp]
-    ++ lib.optional (stdenv.system == "armv5tel-linux") [uboot];
+    ++ lib.optional (platform.uboot != null) [platform.uboot];
   
   arch =
     if xen then "xen" else
@@ -93,7 +91,7 @@ stdenv.mkDerivation {
   allowLocalVersion = false; # don't allow patches to set a suffix
   inherit localVersion; # but do allow the user to set one.
 
-  makeUImage = if (stdenv.system == "armv5tel-linux") then true else false;
+  makeUImage = if (platform.uboot != null) then true else false;
 
   meta = {
     description =
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4015968ac5e59..18ec7f4f18975 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -424,6 +424,8 @@ let
     uboot = null;
   };
 
+  platform = platformPC;
+
   ### TOOLS
 
   darwinArchUtility = import ../os-specific/darwin/arch {
@@ -5576,14 +5578,14 @@ let
   };
 
   kernel_2_6_31 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.31.nix) {
-    inherit fetchurl stdenv perl mktemp module_init_tools uboot;
+    inherit fetchurl stdenv perl mktemp module_init_tools platform;
     kernelPatches = [];
   };
 
   kernel_2_6_31_zen5 = makeOverridable (import ../os-specific/linux/zen-kernel/2.6.31-zen5.nix) {
     inherit fetchurl stdenv perl mktemp module_init_tools
       lib builderDefs;
-    platform = getConfig [ "platform" ] platformPC;
+    inherit platform;
   };
 
   kernel_2_6_31_zen5_bfs = kernel_2_6_31_zen5.override {