summary refs log tree commit diff
path: root/pkgs/build-support/kernel
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-08 18:47:55 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-11-08 18:47:55 +0000
commitbe2ff2328071f7c8821fc2dce25f1580b02511d2 (patch)
treec326decef523a5048338061826559263b875957b /pkgs/build-support/kernel
parent7769ad11bdb1ac871d08c6ef9cc47321c53c053f (diff)
downloadnixpkgs-be2ff2328071f7c8821fc2dce25f1580b02511d2.tar
nixpkgs-be2ff2328071f7c8821fc2dce25f1580b02511d2.tar.gz
nixpkgs-be2ff2328071f7c8821fc2dce25f1580b02511d2.tar.bz2
nixpkgs-be2ff2328071f7c8821fc2dce25f1580b02511d2.tar.lz
nixpkgs-be2ff2328071f7c8821fc2dce25f1580b02511d2.tar.xz
nixpkgs-be2ff2328071f7c8821fc2dce25f1580b02511d2.tar.zst
nixpkgs-be2ff2328071f7c8821fc2dce25f1580b02511d2.zip
Making the 'makeInitrd' expression use "platform"
svn path=/nixpkgs/branches/stdenv-updates/; revision=18292
Diffstat (limited to 'pkgs/build-support/kernel')
-rw-r--r--pkgs/build-support/kernel/make-initrd.nix8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix
index 92142b5ef43..96268577696 100644
--- a/pkgs/build-support/kernel/make-initrd.nix
+++ b/pkgs/build-support/kernel/make-initrd.nix
@@ -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;