pkgs/build-support/kernel/make-initrd.nix: fix eval for test on darwin

This commit is contained in:
Tristan Ross 2024-06-13 10:37:16 -07:00
parent c8697fdd04
commit 23ce5265d0
No known key found for this signature in database
GPG Key ID: B09C422035669AF8

View File

@ -56,7 +56,7 @@ in
, prepend ? [] , prepend ? []
# Whether to wrap the initramfs in a u-boot image. # 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 # 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 # guess may not align with u-boot's nomenclature correctly, so it can
@ -75,11 +75,9 @@ let
toValidStoreName = x: with builtins; toValidStoreName = x: with builtins;
lib.concatStringsSep "-" (filter (x: !(isList x)) (split "[^a-zA-Z0-9_=.?-]+" x)); 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; inherit name makeUInitrd extension uInitrdArch prepend;
${if makeUInitrd then "uInitrdCompression" else null} = uInitrdCompression;
builder = ./make-initrd.sh; builder = ./make-initrd.sh;
nativeBuildInputs = [ perl libarchive ] nativeBuildInputs = [ perl libarchive ]
@ -110,4 +108,6 @@ in stdenvNoCC.mkDerivation rec {
contents contents
(lib.range 0 (lib.length contents - 1)); (lib.range 0 (lib.length contents - 1));
pathsFromGraph = ./paths-from-graph.pl; pathsFromGraph = ./paths-from-graph.pl;
} } // lib.optionalAttrs makeUInitrd {
uInitrdCompression = uInitrdCompression;
})