summary refs log tree commit diff
path: root/nixos/lib/make-iso9660-image.nix
diff options
context:
space:
mode:
authorBob van der Linden <bobvanderlinden@gmail.com>2014-10-26 21:29:04 +0100
committerLuca Bruno <lucabru@src.gnome.org>2014-11-02 17:35:16 +0100
commit455db168b30d53c903c96be80ef843b79e0744ae (patch)
tree63097feadc4f0fccf4308e8f53a86607dd5bb611 /nixos/lib/make-iso9660-image.nix
parent560fd3a5b72f4beb96946264d350e27b289ebd3a (diff)
downloadnixlib-455db168b30d53c903c96be80ef843b79e0744ae.tar
nixlib-455db168b30d53c903c96be80ef843b79e0744ae.tar.gz
nixlib-455db168b30d53c903c96be80ef843b79e0744ae.tar.bz2
nixlib-455db168b30d53c903c96be80ef843b79e0744ae.tar.lz
nixlib-455db168b30d53c903c96be80ef843b79e0744ae.tar.xz
nixlib-455db168b30d53c903c96be80ef843b79e0744ae.tar.zst
nixlib-455db168b30d53c903c96be80ef843b79e0744ae.zip
nixos: iso-image: use syslinux bootloader for USB booting support
This changes the bootloader for iso generation from Grub to
syslinux. In addition this adds USB booting support, so that
"dd" can be used to burn the generated ISO to USB thumbdrives
instead of needing applications like UnetBootin.
Diffstat (limited to 'nixos/lib/make-iso9660-image.nix')
-rw-r--r--nixos/lib/make-iso9660-image.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/nixos/lib/make-iso9660-image.nix b/nixos/lib/make-iso9660-image.nix
index 5ad546e9534d..b2409c6006bc 100644
--- a/nixos/lib/make-iso9660-image.nix
+++ b/nixos/lib/make-iso9660-image.nix
@@ -1,4 +1,4 @@
-{ stdenv, perl, cdrkit, pathsFromGraph
+{ stdenv, perl, pathsFromGraph, xorriso, syslinux
 
 , # The file name of the resulting ISO image.
   isoName ? "cd.iso"
@@ -22,12 +22,18 @@
 , # Whether this should be an efi-bootable El-Torito CD.
   efiBootable ? false
 
+, # Wheter this should be an hybrid CD (bootable from USB as well as CD).
+  usbBootable ? false
+
 , # The path (in the ISO file system) of the boot image.
   bootImage ? ""
 
 , # The path (in the ISO file system) of the efi boot image.
   efiBootImage ? ""
 
+, # The path (outside the ISO file system) of the isohybrid-mbr image.
+  isohybridMbrImage ? ""
+
 , # Whether to compress the resulting ISO image with bzip2.
   compressImage ? false
 
@@ -38,13 +44,14 @@
 
 assert bootable -> bootImage != "";
 assert efiBootable -> efiBootImage != "";
+assert usbBootable -> isohybridMbrImage != "";
 
 stdenv.mkDerivation {
   name = "iso9660-image";
   builder = ./make-iso9660-image.sh;
-  buildInputs = [perl cdrkit];
+  buildInputs = [perl xorriso syslinux];
 
-  inherit isoName bootable bootImage compressImage volumeID pathsFromGraph efiBootImage efiBootable;
+  inherit isoName bootable bootImage compressImage volumeID pathsFromGraph efiBootImage efiBootable isohybridMbrImage usbBootable;
 
   # !!! should use XML.
   sources = map (x: x.source) contents;