Skip to content

Commit

Permalink
Changing a bit the usage of 'platform' along the kernel, and expectin…
Browse files Browse the repository at this point in the history
…g it to be

overrided by pkgOverrides on desire.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18267
  • Loading branch information
Lluís Batlle i Rossell committed Nov 7, 2009
1 parent ed09bc1 commit 99e776e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 3 additions & 5 deletions pkgs/os-specific/linux/kernel/generic.nix
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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 =
Expand Down
6 changes: 4 additions & 2 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -424,6 +424,8 @@ let
uboot = null;
};

platform = platformPC;

### TOOLS

darwinArchUtility = import ../os-specific/darwin/arch {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 99e776e

Please sign in to comment.