summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2012-03-16 05:37:24 +0000
committerShea Levy <shea@shealevy.com>2012-03-16 05:37:24 +0000
commit8efda48496d1be5d47518f7903b5ada110738beb (patch)
tree9d89a4e9a1656c5734ba579156d1bdcca8878ac9 /lib
parentb89a65e54cf1742f37db6d24f7c8a7dd1e930be7 (diff)
downloadnixlib-8efda48496d1be5d47518f7903b5ada110738beb.tar
nixlib-8efda48496d1be5d47518f7903b5ada110738beb.tar.gz
nixlib-8efda48496d1be5d47518f7903b5ada110738beb.tar.bz2
nixlib-8efda48496d1be5d47518f7903b5ada110738beb.tar.lz
nixlib-8efda48496d1be5d47518f7903b5ada110738beb.tar.xz
nixlib-8efda48496d1be5d47518f7903b5ada110738beb.tar.zst
nixlib-8efda48496d1be5d47518f7903b5ada110738beb.zip
Enable building an efi-bootable ISO
svn path=/nixos/trunk/; revision=33140
Diffstat (limited to 'lib')
-rw-r--r--lib/make-iso9660-image.nix9
-rw-r--r--lib/make-iso9660-image.sh3
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/make-iso9660-image.nix b/lib/make-iso9660-image.nix
index 9dfde3e4a7c1..5ad546e9534d 100644
--- a/lib/make-iso9660-image.nix
+++ b/lib/make-iso9660-image.nix
@@ -19,9 +19,15 @@
 , # Whether this should be an El-Torito bootable CD.
   bootable ? false
 
+, # Whether this should be an efi-bootable El-Torito CD.
+  efiBootable ? 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 ? ""
+
 , # Whether to compress the resulting ISO image with bzip2.
   compressImage ? false
 
@@ -31,13 +37,14 @@
 }:
 
 assert bootable -> bootImage != "";
+assert efiBootable -> efiBootImage != "";
 
 stdenv.mkDerivation {
   name = "iso9660-image";
   builder = ./make-iso9660-image.sh;
   buildInputs = [perl cdrkit];
 
-  inherit isoName bootable bootImage compressImage volumeID pathsFromGraph;
+  inherit isoName bootable bootImage compressImage volumeID pathsFromGraph efiBootImage efiBootable;
 
   # !!! should use XML.
   sources = map (x: x.source) contents;
diff --git a/lib/make-iso9660-image.sh b/lib/make-iso9660-image.sh
index c6996e8db9a5..89b681ed2cd5 100644
--- a/lib/make-iso9660-image.sh
+++ b/lib/make-iso9660-image.sh
@@ -34,6 +34,9 @@ if test -n "$bootable"; then
     bootFlags="-b $bootImage -c .boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table"
 fi
 
+if test -n "$efiBootable"; then
+    bootFlags="$bootFlags -eltorito-alt-boot -e $efiBootImage -no-emul-boot"
+fi
 
 touch pathlist