3
0
Fork 0
forked from mirrors/nixpkgs

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 # `contents = {object = ...; symlink = /init;}' is a typical
# argument. # argument.
{stdenv, perl, cpio, contents, uboot ? null}: {stdenv, perl, cpio, contents, platform}:
assert stdenv.system == "armv5tel-linux" -> uboot != null;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "initrd"; name = "initrd";
builder = ./make-initrd.sh; builder = ./make-initrd.sh;
buildInputs = [perl cpio] 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. # !!! should use XML.
objects = map (x: x.object) contents; objects = map (x: x.object) contents;

View file

@ -321,7 +321,7 @@ let
}; };
makeInitrd = {contents}: import ../build-support/kernel/make-initrd.nix { 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" {} '' makeSetupHook = script: runCommand "hook" {} ''