diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-02-05 10:28:52 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-02-05 10:28:52 +0100 |
commit | 76a439239eb310d9ad76d998b34d5d3bc0e37acb (patch) | |
tree | 69e2f87d4a1ec8f8962d35e330188afcf8f88dcb /pkgs/tools/misc/wimboot/default.nix | |
parent | 080f1e7f5c94a171d070d1990104e06880589ca0 (diff) | |
parent | 2b3d2dbaf9f76519082126074b3aae26d2ced67f (diff) | |
download | nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.gz nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.bz2 nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.lz nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.xz nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.tar.zst nixlib-76a439239eb310d9ad76d998b34d5d3bc0e37acb.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/tools/misc/wimboot/default.nix')
-rw-r--r-- | pkgs/tools/misc/wimboot/default.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/tools/misc/wimboot/default.nix b/pkgs/tools/misc/wimboot/default.nix new file mode 100644 index 000000000000..a63fa4106345 --- /dev/null +++ b/pkgs/tools/misc/wimboot/default.nix @@ -0,0 +1,47 @@ +{ stdenv, fetchFromGitHub, fetchpatch, libbfd, zlib, libiberty }: + +stdenv.mkDerivation rec { + pname = "wimboot"; + version = "2.6.0"; + + src = fetchFromGitHub { + owner = "ipxe"; + repo = "wimboot"; + rev = "v${version}"; + sha256 = "134wqqr147az5vbj4szd0xffwa99b4rar7w33zm3119zsn7sd79k"; + }; + + NIX_CFLAGS_COMPILE = "-Wno-address-of-packed-member"; # Fails on gcc9 + + patches = [ + # Fix for newer binutils + (fetchpatch { + url = + "https://github.com/ipxe/wimboot/commit/91be50c17d4d9f463109d5baafd70f9fdadd86db.patch"; + sha256 = "113448n49hmk8nz1dxbhxiciwl281zwalvb8z5p9xfnjvibj8274"; + }) + ]; + + # We cannot use sourceRoot because the patch wouldn't apply + postPatch = '' + cd src + ''; + + hardeningDisable = [ "pic" ]; + + 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 stdenv.lib; { + homepage = "https://ipxe.org/wimboot"; + description = "Windows Imaging Format bootloader"; + license = licenses.gpl2; + maintainers = with maintainers; [ das_j ajs124 ]; + platforms = platforms.x86; # Fails on aarch64 + }; +} |