makeInitrd: Use stdenvNoCC

This commit is contained in:
Eelco Dolstra 2019-10-11 17:11:19 +02:00
parent cae6db88d3
commit 328796d734
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE

View File

@ -12,7 +12,7 @@
# `contents = {object = ...; symlink = /init;}' is a typical # `contents = {object = ...; symlink = /init;}' is a typical
# argument. # argument.
{ stdenv, perl, cpio, contents, ubootTools { stdenvNoCC, perl, cpio, contents, ubootTools
, name ? "initrd" , name ? "initrd"
, compressor ? "gzip -9n" , compressor ? "gzip -9n"
, prepend ? [] , prepend ? []
@ -23,15 +23,15 @@ 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 stdenv.mkDerivation rec { in stdenvNoCC.mkDerivation rec {
inherit name; inherit name;
builder = ./make-initrd.sh; builder = ./make-initrd.sh;
makeUInitrd = stdenv.hostPlatform.platform.kernelTarget == "uImage"; makeUInitrd = stdenvNoCC.hostPlatform.platform.kernelTarget == "uImage";
nativeBuildInputs = [ perl cpio ] nativeBuildInputs = [ perl cpio ]
++ stdenv.lib.optional makeUInitrd ubootTools; ++ stdenvNoCC.lib.optional makeUInitrd ubootTools;
# !!! should use XML. # !!! should use XML.
objects = map (x: x.object) contents; objects = map (x: x.object) contents;
@ -50,4 +50,3 @@ in stdenv.mkDerivation rec {
inherit compressor prepend; inherit compressor prepend;
} }