ISO images: Initialize the Nix database with correct NAR hashes/sizes

The boot test now runs "nix verify" to ensure that all hashes are
correct.
This commit is contained in:
Eelco Dolstra 2018-02-07 16:50:47 +01:00
parent 5193807750
commit df117acab7
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 15 additions and 52 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, perl, pathsFromGraph, xorriso, syslinux
{ stdenv, perl, closureInfo, xorriso, syslinux
, # The file name of the resulting ISO image.
isoName ? "cd.iso"
@ -48,9 +48,9 @@ assert usbBootable -> isohybridMbrImage != "";
stdenv.mkDerivation {
name = isoName;
builder = ./make-iso9660-image.sh;
buildInputs = [perl xorriso syslinux];
buildInputs = [ xorriso syslinux ];
inherit isoName bootable bootImage compressImage volumeID pathsFromGraph efiBootImage efiBootable isohybridMbrImage usbBootable;
inherit isoName bootable bootImage compressImage volumeID efiBootImage efiBootable isohybridMbrImage usbBootable;
# !!! should use XML.
sources = map (x: x.source) contents;
@ -61,6 +61,5 @@ stdenv.mkDerivation {
symlinks = map (x: x.symlink) storeContents;
# For obtaining the closure of `storeContents'.
exportReferencesGraph =
map (x: [("closure-" + baseNameOf x.object) x.object]) storeContents;
closureInfo = closureInfo { rootPaths = map (x: x.object) storeContents; };
}