git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #60984 from edef1c/ipxe-uefi

ipxe: enable UEFI support

commit6a347bca67e91d33ec717c7015abeba470443245 authoredef <edef@edef.eu> dateSat 25 May 2019, 09:57 (7 years ago) parent62d4c2bff4db30
1 file changed+14−3
pkgs/tools/misc/ipxe/default.nix+14−3
pkgs/tools/misc/ipxe/default.nix+14−3
@@ -1,16 +1,24 @@
1−{ stdenv, lib, fetchgit, perl, cdrkit, syslinux, xz, openssl
1+{ stdenv, lib, fetchgit, perl, cdrkit, syslinux, xz, openssl, gnu-efi
22, embedScript ? null
33}:
44
55let
66 date = "20190318";
77 rev = "ebf2eaf515e46abd43bc798e7e4ba77bfe529218";
8+ targets = [
9+ "bin-x86_64-efi/ipxe.efi"
10+ "bin/ipxe.dsk"
11+ "bin/ipxe.usb"
12+ "bin/ipxe.iso"
13+ "bin/ipxe.lkrn"
14+ "bin/undionly.kpxe"
15+ ];
816in
917
1018stdenv.mkDerivation {
1119 name = "ipxe-${date}-${builtins.substring 0 7 rev}";
1220
13− buildInputs = [ perl cdrkit syslinux xz openssl ];
21+ buildInputs = [ perl cdrkit syslinux xz openssl gnu-efi ];
1422
1523 src = fetchgit {
1624 url = https://git.ipxe.org/ipxe.git;
@@ -36,14 +44,17 @@ stdenv.mkDerivation {
3644 runHook preConfigure
3745 for opt in $enabledOptions; do echo "#define $opt" >> src/config/general.h; done
3846 sed -i '/cp \''${ISOLINUX_BIN}/s/$/ --no-preserve=mode/' src/util/geniso
47+ substituteInPlace src/Makefile.housekeeping --replace '/bin/echo' echo
3948 runHook postConfigure
4049 '';
4150
4251 preBuild = "cd src";
4352
53+ buildFlags = targets;
54+
4455 installPhase = ''
4556 mkdir -p $out
46− cp bin/ipxe.dsk bin/ipxe.usb bin/ipxe.iso bin/ipxe.lkrn bin/undionly.kpxe $out
57+ cp ${lib.concatStringsSep " " targets} $out
4758
4859 # Some PXE constellations especially with dnsmasq are looking for the file with .0 ending
4960 # let's provide it as a symlink to be compatible in this case.