about 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.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix
index 9c27a142f4b65..5f8d1eee8ce4d 100644
--- a/pkgs/build-support/kernel/make-initrd.nix
+++ b/pkgs/build-support/kernel/make-initrd.nix
@@ -56,7 +56,7 @@ in
 , prepend ? []
 
 # Whether to wrap the initramfs in a u-boot image.
-, makeUInitrd ? stdenvNoCC.hostPlatform.linux-kernel.target == "uImage"
+, makeUInitrd ? stdenvNoCC.hostPlatform.linux-kernel.target or "dummy" == "uImage"
 
 # If generating a u-boot image, the architecture to use. The default
 # guess may not align with u-boot's nomenclature correctly, so it can
@@ -75,11 +75,9 @@ let
   toValidStoreName = x: with builtins;
     lib.concatStringsSep "-" (filter (x: !(isList x)) (split "[^a-zA-Z0-9_=.?-]+" x));
 
-in stdenvNoCC.mkDerivation rec {
+in stdenvNoCC.mkDerivation (rec {
   inherit name makeUInitrd extension uInitrdArch prepend;
 
-  ${if makeUInitrd then "uInitrdCompression" else null} = uInitrdCompression;
-
   builder = ./make-initrd.sh;
 
   nativeBuildInputs = [ perl libarchive ]
@@ -110,4 +108,6 @@ in stdenvNoCC.mkDerivation rec {
       contents
       (lib.range 0 (lib.length contents - 1));
   pathsFromGraph = ./paths-from-graph.pl;
-}
+} // lib.optionalAttrs makeUInitrd {
+  uInitrdCompression = uInitrdCompression;
+})