2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2021-02-05 17:12:51 +00:00
|
|
|
, fetchgit, autoconf, automake, pkg-config, help2man
|
2020-04-24 23:36:52 +00:00
|
|
|
, openssl, libuuid, gnu-efi, libbfd
|
|
|
|
}:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "sbsigntool";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "0.9.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "v${version}";
|
2023-03-24 00:07:29 +00:00
|
|
|
hash = "sha256-5DInWgl1gThjjfGOsts1H1s1GbMCkd0gjbmG3gA3Fhg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./autoconf.patch ];
|
|
|
|
|
|
|
|
prePatch = "patchShebangs .";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake pkg-config help2man ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ openssl libuuid libbfd gnu-efi ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
substituteInPlace configure.ac --replace "@@NIX_GNUEFI@@" "${gnu-efi}"
|
|
|
|
|
|
|
|
lib/ccan.git/tools/create-ccan-tree --build-type=automake lib/ccan "talloc read_write_all build_assert array_size endian"
|
|
|
|
touch AUTHORS
|
|
|
|
touch ChangeLog
|
|
|
|
|
|
|
|
echo "SUBDIRS = lib/ccan src docs" >> Makefile.am
|
|
|
|
|
|
|
|
aclocal
|
|
|
|
autoheader
|
|
|
|
autoconf
|
|
|
|
automake --add-missing -Wno-portability
|
|
|
|
|
|
|
|
./configure --prefix=$out
|
2022-09-14 18:05:37 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tools for maintaining UEFI signature databases";
|
|
|
|
homepage = "http://jk.ozlabs.org/docs/sbkeysync-maintaing-uefi-key-databases";
|
2022-12-28 21:21:41 +00:00
|
|
|
maintainers = with maintainers; [ hmenke raitobezarius ];
|
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ]; # Broken on i686
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
};
|
|
|
|
}
|