Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, gnu-efi, openssl, sbsigntool, perl, perlPackages, 2help2man, fetchgit }: 3stdenv.mkDerivation rec { 4 pname = "efitools"; 5 version = "1.9.2"; 6 7 buildInputs = [ 8 gnu-efi 9 openssl 10 sbsigntool 11 ]; 12 13 nativeBuildInputs = [ 14 perl 15 perlPackages.FileSlurp 16 help2man 17 ]; 18 19 src = fetchgit { 20 url = "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git"; 21 rev = "v${version}"; 22 sha256 = "0jabgl2pxvfl780yvghq131ylpf82k7banjz0ksjhlm66ik8gb1i"; 23 }; 24 25 postPatch = '' 26 sed -i -e 's#/usr/include/efi#${gnu-efi}/include/efi/#g' Make.rules 27 sed -i -e 's#/usr/lib64/gnuefi#${gnu-efi}/lib/#g' Make.rules 28 sed -i -e 's#$(DESTDIR)/usr#$(out)#g' Make.rules 29 substituteInPlace lib/console.c --replace "EFI_WARN_UNKOWN_GLYPH" "EFI_WARN_UNKNOWN_GLYPH" 30 patchShebangs . 31 ''; 32 33 meta = with lib; { 34 description = "Tools for manipulating UEFI secure boot platforms"; 35 homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git"; 36 license = licenses.gpl2; 37 maintainers = [ maintainers.grahamc ]; 38 platforms = platforms.linux; 39 }; 40}