Making the 'makeInitrd' expression use "platform"

svn path=/nixpkgs/branches/stdenv-updates/; revision=18292
This commit is contained in:
Lluís Batlle i Rossell 2009-11-08 18:47:55 +00:00
parent 7769ad11bd
commit be2ff23280
2 changed files with 4 additions and 6 deletions

View File

@ -12,17 +12,15 @@
# `contents = {object = ...; symlink = /init;}' is a typical
# argument.
{stdenv, perl, cpio, contents, uboot ? null}:
assert stdenv.system == "armv5tel-linux" -> uboot != null;
{stdenv, perl, cpio, contents, platform}:
stdenv.mkDerivation {
name = "initrd";
builder = ./make-initrd.sh;
buildInputs = [perl cpio]
++ stdenv.lib.optional (stdenv.system == "armv5tel-linux") [ uboot ];
++ stdenv.lib.optional (platform.uboot != null) [ platform.uboot ];
makeUInitrd = if (stdenv.system == "armv5tel-linux") then true else false;
makeUInitrd = if (platform.uboot != null) then true else false;
# !!! should use XML.
objects = map (x: x.object) contents;

View File

@ -321,7 +321,7 @@ let
};
makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix {
inherit stdenv perl cpio contents uboot;
inherit stdenv perl cpio contents platform;
};
makeSetupHook = script: runCommand "hook" {} ''