Merge pull request #187771 from RaitoBezarius/sbctl

sbctl: init at 0.9
This commit is contained in:
K900 2022-08-27 20:39:11 +03:00 committed by GitHub
commit a76adae362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,45 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, asciidoc
, databasePath ? "/etc/secureboot"
}:
buildGoModule rec {
pname = "sbctl";
version = "0.9";
src = fetchFromGitHub {
owner = "Foxboron";
repo = pname;
rev = version;
hash = "sha256-mntb3EMB+QTnFU476Dq6T6rAAv0JeYbvWJ/pbL3a4RE=";
};
vendorSha256 = "sha256-k6AIYigjxbitH0hH+vwRt2urhNYTToIF0eSsIWbzslI=";
ldflags = [ "-s" "-w" "-X github.com/foxboron/sbctl.DatabasePath=${databasePath}" ];
nativeBuildInputs = [ installShellFiles asciidoc ];
postBuild = ''
make docs/sbctl.8
'';
postInstall = ''
installManPage docs/sbctl.8
installShellCompletion --cmd sbctl \
--bash <($out/bin/sbctl completion bash) \
--fish <($out/bin/sbctl completion fish) \
--zsh <($out/bin/sbctl completion zsh)
'';
meta = with lib; {
description = "Secure Boot key manager";
homepage = "https://github.com/Foxboron/sbctl";
license = licenses.mit;
maintainers = with maintainers; [ raitobezarius ];
};
}

View File

@ -7177,6 +7177,8 @@ with pkgs;
efitools = callPackage ../tools/security/efitools { };
sbctl = callPackage ../tools/security/sbctl { };
sbsigntool = callPackage ../tools/security/sbsigntool { };
gsmartcontrol = callPackage ../tools/misc/gsmartcontrol { };