diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-10-11 17:11:19 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-10-11 17:12:09 +0200 |
commit | 328796d734dd8a68fee98b9a75309f40fa494a6d (patch) | |
tree | 507d8ce2389862f4be5749f79636ceeb919d7426 /pkgs/build-support/kernel/make-initrd.nix | |
parent | cae6db88d30e45b290582a6236a814ab76c5fdba (diff) |
makeInitrd: Use stdenvNoCC
Diffstat (limited to 'pkgs/build-support/kernel/make-initrd.nix')
-rw-r--r-- | pkgs/build-support/kernel/make-initrd.nix | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix index 7a5642e565de1..ed5dbdaee1714 100644 --- a/pkgs/build-support/kernel/make-initrd.nix +++ b/pkgs/build-support/kernel/make-initrd.nix @@ -12,26 +12,26 @@ # `contents = {object = ...; symlink = /init;}' is a typical # argument. -{ stdenv, perl, cpio, contents, ubootTools +{ stdenvNoCC, perl, cpio, contents, ubootTools , name ? "initrd" , compressor ? "gzip -9n" , prepend ? [] , lib }: -let +let # !!! Move this into a public lib function, it is probably useful for others - toValidStoreName = x: with builtins; + toValidStoreName = x: with builtins; lib.concatStringsSep "-" (filter (x: !(isList x)) (split "[^a-zA-Z0-9_=.?-]+" x)); -in stdenv.mkDerivation rec { +in stdenvNoCC.mkDerivation rec { inherit name; builder = ./make-initrd.sh; - makeUInitrd = stdenv.hostPlatform.platform.kernelTarget == "uImage"; + makeUInitrd = stdenvNoCC.hostPlatform.platform.kernelTarget == "uImage"; nativeBuildInputs = [ perl cpio ] - ++ stdenv.lib.optional makeUInitrd ubootTools; + ++ stdenvNoCC.lib.optional makeUInitrd ubootTools; # !!! should use XML. objects = map (x: x.object) contents; @@ -42,12 +42,11 @@ in stdenv.mkDerivation rec { # Note: we don't use closureInfo yet, as that won't build with nix-1.x. # See #36268. exportReferencesGraph = - lib.zipListsWith - (x: i: [("closure-${toValidStoreName (baseNameOf x.symlink)}-${toString i}") x.object]) - contents + lib.zipListsWith + (x: i: [("closure-${toValidStoreName (baseNameOf x.symlink)}-${toString i}") x.object]) + contents (lib.range 0 (lib.length contents - 1)); pathsFromGraph = ./paths-from-graph.pl; inherit compressor prepend; } - |