summary refs log tree commit diff
path: root/pkgs/build-support/kernel/make-initrd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/kernel/make-initrd.nix')
-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 92142b5ef43e..962685776962 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;