makeInitrd: Use stdenvNoCC
This commit is contained in:
parent
cae6db88d3
commit
328796d734
@ -12,26 +12,26 @@
|
|||||||
# `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 ? []
|
||||||
, lib
|
, lib
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
# !!! Move this into a public lib function, it is probably useful for others
|
# !!! 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));
|
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;
|
||||||
@ -42,12 +42,11 @@ in stdenv.mkDerivation rec {
|
|||||||
# Note: we don't use closureInfo yet, as that won't build with nix-1.x.
|
# Note: we don't use closureInfo yet, as that won't build with nix-1.x.
|
||||||
# See #36268.
|
# See #36268.
|
||||||
exportReferencesGraph =
|
exportReferencesGraph =
|
||||||
lib.zipListsWith
|
lib.zipListsWith
|
||||||
(x: i: [("closure-${toValidStoreName (baseNameOf x.symlink)}-${toString i}") x.object])
|
(x: i: [("closure-${toValidStoreName (baseNameOf x.symlink)}-${toString i}") x.object])
|
||||||
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;
|
||||||
|
|
||||||
inherit compressor prepend;
|
inherit compressor prepend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user