2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, gnu-efi, openssl, sbsigntool, perl, perlPackages,
|
2023-06-15 12:25:58 +00:00
|
|
|
help2man, fetchzip }:
|
2019-01-22 14:55:38 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "efitools";
|
2019-01-22 14:55:38 +00:00
|
|
|
version = "1.9.2";
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gnu-efi
|
|
|
|
openssl
|
|
|
|
sbsigntool
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
perl
|
|
|
|
perlPackages.FileSlurp
|
|
|
|
help2man
|
|
|
|
];
|
|
|
|
|
2023-06-15 12:25:58 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapshot/efitools-v${version}.tar.gz";
|
2019-01-22 14:55:38 +00:00
|
|
|
sha256 = "0jabgl2pxvfl780yvghq131ylpf82k7banjz0ksjhlm66ik8gb1i";
|
|
|
|
};
|
|
|
|
|
2024-05-21 16:13:44 +00:00
|
|
|
# https://github.com/ncroxon/gnu-efi/issues/7#issuecomment-2122741592
|
|
|
|
patches = [
|
|
|
|
./aarch64.patch
|
|
|
|
];
|
|
|
|
|
2019-01-22 14:55:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e 's#/usr/include/efi#${gnu-efi}/include/efi/#g' Make.rules
|
|
|
|
sed -i -e 's#/usr/lib64/gnuefi#${gnu-efi}/lib/#g' Make.rules
|
|
|
|
sed -i -e 's#$(DESTDIR)/usr#$(out)#g' Make.rules
|
2019-11-16 14:27:38 +00:00
|
|
|
substituteInPlace lib/console.c --replace "EFI_WARN_UNKOWN_GLYPH" "EFI_WARN_UNKNOWN_GLYPH"
|
2019-01-22 14:55:38 +00:00
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-01-22 14:55:38 +00:00
|
|
|
description = "Tools for manipulating UEFI secure boot platforms";
|
2022-06-05 15:36:26 +00:00
|
|
|
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git";
|
2024-04-26 11:35:31 +00:00
|
|
|
license = licenses.gpl2Only;
|
2019-01-22 14:55:38 +00:00
|
|
|
maintainers = [ maintainers.grahamc ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|