about summary refs log tree commit diff
path: root/pkgs/tools/misc/ipxe
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-04-09 08:13:28 +0000
committerAlyssa Ross <hi@alyssa.is>2022-04-09 08:55:17 +0000
commit7d691eadc377619481f6b3acdbcc7df91d2524b8 (patch)
tree373300b78419eee75e0cf6e97da5b26bc302c517 /pkgs/tools/misc/ipxe
parentf385210273bca4462904c3da5ab9165bb7395b26 (diff)
ipxe: 1.21.1 -> unstable-2022-04-06
iPXE does not make stable releases[1].  The tag we were using was an
anomoly[2], and is from 2020.

The geniso script has been replaced with a generic genfsimg script
that works differently.  There are no longer variables we can set to
tell it where to find isolinux.bin or ldlinux.c32, so we have to patch
the script.  It'll look in the same place for both files.

The --preserve=mode modification doesn't seem to be necessary any more
— when it was introduced in 4d7bea7e5ef ("ipxe: fix ISO build"), it
was required to make a working ISO with an embedded script.  But my
ISO with an embedded script now works fine without that change.

[1]: https://github.com/ipxe/ipxe/discussions/544
[2]: https://github.com/ipxe/ipxe/discussions/544#discussioncomment-1894506
Diffstat (limited to 'pkgs/tools/misc/ipxe')
-rw-r--r--pkgs/tools/misc/ipxe/default.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/pkgs/tools/misc/ipxe/default.nix b/pkgs/tools/misc/ipxe/default.nix
index 76ce66e568645..601f2a57eea87 100644
--- a/pkgs/tools/misc/ipxe/default.nix
+++ b/pkgs/tools/misc/ipxe/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, lib, fetchFromGitHub, perl, cdrkit, xz, openssl, gnu-efi, mtools
+{ stdenv, lib, fetchFromGitHub, unstableGitUpdater
+, gnu-efi, mtools, openssl, perl, xorriso, xz
 , syslinux ? null
 , embedScript ? null
 , additionalTargets ? {}
@@ -28,15 +29,15 @@ in
 
 stdenv.mkDerivation rec {
   pname = "ipxe";
-  version = "1.21.1";
+  version = "unstable-2022-04-06";
 
-  nativeBuildInputs = [ perl cdrkit xz openssl gnu-efi mtools ] ++ lib.optional stdenv.hostPlatform.isx86 syslinux;
+  nativeBuildInputs = [ gnu-efi mtools openssl perl xorriso xz ] ++ lib.optional stdenv.hostPlatform.isx86 syslinux;
 
   src = fetchFromGitHub {
     owner = "ipxe";
     repo = "ipxe";
-    rev = "v${version}";
-    sha256 = "1pkf1n1c0rdlzfls8fvjvi1sd9xjd9ijqlyz3wigr70ijcv6x8i9";
+    rev = "70995397e5bdfd3431e12971aa40630c7014785f";
+    sha256 = "SrTNEYk13JXAcJuogm9fZ7CrzJIDRc0aziGdjRNv96I=";
   };
 
   # not possible due to assembler code
@@ -46,9 +47,6 @@ stdenv.mkDerivation rec {
 
   makeFlags =
     [ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here.
-    ] ++ lib.optionals stdenv.hostPlatform.isx86 [
-      "ISOLINUX_BIN_LIST=${syslinux}/share/syslinux/isolinux.bin"
-      "LDLINUX_C32=${syslinux}/share/syslinux/ldlinux.c32"
     ] ++ lib.optional (embedScript != null) "EMBED=${embedScript}";
 
 
@@ -62,8 +60,10 @@ stdenv.mkDerivation rec {
   configurePhase = ''
     runHook preConfigure
     for opt in ${lib.escapeShellArgs enabledOptions}; do echo "#define $opt" >> src/config/general.h; done
-    sed -i '/cp \''${ISOLINUX_BIN}/s/$/ --no-preserve=mode/' src/util/geniso
     substituteInPlace src/Makefile.housekeeping --replace '/bin/echo' echo
+  '' + lib.optionalString stdenv.hostPlatform.isx86 ''
+    substituteInPlace src/util/genfsimg --replace /usr/lib/syslinux ${syslinux}/share/syslinux
+  '' + ''
     runHook postConfigure
   '';
 
@@ -89,6 +89,8 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
+  passthru.updateScript = unstableGitUpdater {};
+
   meta = with lib;
     { description = "Network boot firmware";
       homepage = "https://ipxe.org/";