diff options
author | Raito Bezarius <masterancpp@gmail.com> | 2022-08-21 17:55:34 +0200 |
---|---|---|
committer | Raito Bezarius <masterancpp@gmail.com> | 2022-08-22 12:54:49 +0200 |
commit | 578ce5fd0b50f896b6f985385a41430d785784ee (patch) | |
tree | 248e77cd0ff6bb499a70eee54daa08c76dbf2b02 /pkgs/tools/security/sbctl | |
parent | 042ac07334b4a0f570e918557284c97723a0a590 (diff) |
sbctl: init at 0.9
Diffstat (limited to 'pkgs/tools/security/sbctl')
-rw-r--r-- | pkgs/tools/security/sbctl/default.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/tools/security/sbctl/default.nix b/pkgs/tools/security/sbctl/default.nix new file mode 100644 index 0000000000000..00a5f53d6b504 --- /dev/null +++ b/pkgs/tools/security/sbctl/default.nix @@ -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 ]; + }; +} |