mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 04:46:43 +00:00
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{ 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 ];
|
|
};
|
|
}
|