4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
{ lib, stdenv, gnu-efi, openssl, sbsigntool, perl, perlPackages,
|
|
help2man, fetchgit }:
|
|
stdenv.mkDerivation rec {
|
|
pname = "efitools";
|
|
version = "1.9.2";
|
|
|
|
buildInputs = [
|
|
gnu-efi
|
|
openssl
|
|
sbsigntool
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
perl
|
|
perlPackages.FileSlurp
|
|
help2man
|
|
];
|
|
|
|
src = fetchgit {
|
|
url = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git";
|
|
rev = "v${version}";
|
|
sha256 = "0jabgl2pxvfl780yvghq131ylpf82k7banjz0ksjhlm66ik8gb1i";
|
|
};
|
|
|
|
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
|
|
substituteInPlace lib/console.c --replace "EFI_WARN_UNKOWN_GLYPH" "EFI_WARN_UNKNOWN_GLYPH"
|
|
patchShebangs .
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tools for manipulating UEFI secure boot platforms";
|
|
homepage = "https://git.kernel.org/cgit/linux/kernel/git/jejb/efitools.git";
|
|
license = licenses.gpl2;
|
|
maintainers = [ maintainers.grahamc ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|