makeInitrd: Use closureInfo

This commit is contained in:
Eelco Dolstra
2018-02-23 16:41:31 +01:00
parent d12c9911df
commit 776a5e6ebf
4 changed files with 7 additions and 12 deletions
+3 -6
View File
@@ -12,7 +12,7 @@
# `contents = {object = ...; symlink = /init;}' is a typical
# argument.
{ stdenv, perl, cpio, contents, compressor, prepend, ubootTools
{ stdenv, closureInfo, cpio, contents, compressor, prepend, ubootTools
, hostPlatform
}:
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
makeUInitrd = hostPlatform.platform.kernelTarget == "uImage";
nativeBuildInputs = [ perl cpio ]
nativeBuildInputs = [ cpio ]
++ stdenv.lib.optional makeUInitrd ubootTools;
# !!! should use XML.
@@ -30,10 +30,7 @@ stdenv.mkDerivation rec {
symlinks = map (x: x.symlink) contents;
suffices = map (x: if x ? suffix then x.suffix else "none") contents;
# For obtaining the closure of `contents'.
exportReferencesGraph =
map (x: [("closure-" + baseNameOf x.symlink) x.object]) contents;
pathsFromGraph = ./paths-from-graph.pl;
closure = closureInfo { rootPaths = (map (x: x.object) contents); };
inherit compressor prepend;
}