a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, libbfd, zlib, libiberty }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "wimboot";
|
|
version = "2.7.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ipxe";
|
|
repo = "wimboot";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-rbJONP3ge+2+WzCIpTUZeieQz9Q/MZfEUmQVbZ+9Dro=";
|
|
};
|
|
|
|
sourceRoot = "source/src";
|
|
|
|
# Workaround '-idirafter' ordering bug in staging-next:
|
|
# https://github.com/NixOS/nixpkgs/pull/210004
|
|
# where libc '-idirafter' gets added after user's idirafter and
|
|
# breaks.
|
|
# TODO(trofi): remove it in staging once fixed in cc-wrapper.
|
|
preConfigure = ''
|
|
export NIX_CFLAGS_COMPILE_BEFORE_${lib.replaceStrings ["-" "."] ["_" "_"] stdenv.hostPlatform.config}=$(< ${stdenv.cc}/nix-support/libc-cflags)
|
|
'';
|
|
|
|
buildInputs = [ libbfd zlib libiberty ];
|
|
makeFlags = [ "wimboot.x86_64.efi" ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/share/wimboot/
|
|
cp wimboot.x86_64.efi $out/share/wimboot
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://ipxe.org/wimboot";
|
|
description = "Windows Imaging Format bootloader";
|
|
license = licenses.gpl2Plus;
|
|
maintainers = with maintainers; [ das_j ajs124 ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|