Making the 'makeInitrd' expression use "platform"
svn path=/nixpkgs/branches/stdenv-updates/; revision=18292
This commit is contained in:
parent
7769ad11bd
commit
be2ff23280
@ -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;
|
||||
|
@ -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" {} ''
|
||||
|
Loading…
Reference in New Issue
Block a user