mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
makeInitrd: Use stdenvNoCC
This commit is contained in:
parent
cae6db88d3
commit
328796d734
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue