1 { stdenv, closureInfo, xorriso, syslinux, libossp_uuid
3 , # The file name of the resulting ISO image.
6 , # The files and directories to be placed in the ISO file system.
7 # This is a list of attribute sets {source, target} where `source'
8 # is the file system object (regular file or directory) to be
9 # grafted in the file system at path `target'.
12 , # In addition to `contents', the closure of the store paths listed
13 # in `storeContents' are also placed in the Nix store of the CD.
14 # This is a list of attribute sets {object, symlink} where `object'
15 # is a store path whose closure will be copied, and `symlink' is a
16 # symlink to `object' that will be added to the CD.
19 , # Whether this should be an El-Torito bootable CD.
22 , # Whether this should be an efi-bootable El-Torito CD.
25 , # Whether this should be an hybrid CD (bootable from USB as well as CD).
28 , # The path (in the ISO file system) of the boot image.
31 , # The path (in the ISO file system) of the efi boot image.
34 , # The path (outside the ISO file system) of the isohybrid-mbr image.
35 isohybridMbrImage ? ""
37 , # Whether to compress the resulting ISO image with zstd.
38 compressImage ? false, zstd
44 assert bootable -> bootImage != "";
45 assert efiBootable -> efiBootImage != "";
46 assert usbBootable -> isohybridMbrImage != "";
50 __structuredAttrs = true;
52 buildCommandPath = ./make-iso9660-image.sh;
53 nativeBuildInputs = [ xorriso syslinux zstd libossp_uuid ];
55 inherit isoName bootable bootImage compressImage volumeID efiBootImage efiBootable isohybridMbrImage usbBootable;
57 sources = map (x: x.source) contents;
58 targets = map (x: x.target) contents;
60 objects = map (x: x.object) storeContents;
61 symlinks = map (x: x.symlink) storeContents;
63 # For obtaining the closure of `storeContents'.
64 closureInfo = closureInfo { rootPaths = map (x: x.object) storeContents; };