summary refs log tree commit diff
path: root/pkgs/tools/security/fulcio
diff options
context:
space:
mode:
author06kellyjac <dev@j-k.io>2021-07-07 12:37:38 +0100
committer06kellyjac <dev@j-k.io>2021-07-07 12:37:38 +0100
commit0925a17c9ba9c041980f8451da5c1702bbaaeb07 (patch)
treee7a09d5e4072c67e829016b2e509129a1cd4472f /pkgs/tools/security/fulcio
parent8d0df26d8e115c14dd800a09e7bb8fa1289142de (diff)
downloadnixpkgs-0925a17c9ba9c041980f8451da5c1702bbaaeb07.tar
nixpkgs-0925a17c9ba9c041980f8451da5c1702bbaaeb07.tar.gz
nixpkgs-0925a17c9ba9c041980f8451da5c1702bbaaeb07.tar.bz2
nixpkgs-0925a17c9ba9c041980f8451da5c1702bbaaeb07.tar.lz
nixpkgs-0925a17c9ba9c041980f8451da5c1702bbaaeb07.tar.xz
nixpkgs-0925a17c9ba9c041980f8451da5c1702bbaaeb07.tar.zst
nixpkgs-0925a17c9ba9c041980f8451da5c1702bbaaeb07.zip
fulcio: init at 0.1.0
Diffstat (limited to 'pkgs/tools/security/fulcio')
-rw-r--r--pkgs/tools/security/fulcio/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/security/fulcio/default.nix b/pkgs/tools/security/fulcio/default.nix
new file mode 100644
index 00000000000..4539f10e50d
--- /dev/null
+++ b/pkgs/tools/security/fulcio/default.nix
@@ -0,0 +1,41 @@
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
+
+buildGoModule rec {
+  pname = "fulcio";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "sigstore";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-+HWzhg+LTKpr9VJ9mzQghwOuGgp3EBb4/zltaqp0zHw=";
+  };
+  vendorSha256 = "sha256-1tR1vUm5eFBS93kELQoKWEyFlfMF28GBI8VEHxTyeM4=";
+
+  ldflags = [ "-s" "-w" ];
+
+  # Install completions post-install
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --cmd fulcio \
+      --bash <($out/bin/fulcio completion bash) \
+      --fish <($out/bin/fulcio completion fish) \
+      --zsh <($out/bin/fulcio completion zsh)
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+    $out/bin/fulcio --help
+    runHook postInstallCheck
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/sigstore/fulcio";
+    changelog = "https://github.com/sigstore/fulcio/releases/tag/${version}";
+    description = "A Root-CA for code signing certs - issuing certificates based on an OIDC email address";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ lesuisse jk ];
+  };
+}