nixpkgs/pkgs/tools/security/fulcio/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2021-07-07 12:37:38 +01:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "fulcio";
version = "0.1.1";
2021-07-07 12:37:38 +01:00
src = fetchFromGitHub {
owner = "sigstore";
repo = pname;
rev = "v${version}";
sha256 = "sha256-MvLQMGPyJYqYUljLqsr+qJeeYnxdH9aNGkWpDRvOeh8=";
2021-07-07 12:37:38 +01:00
};
vendorSha256 = "sha256-pRL0et+UOi/tzuQz/Q7UmSA+pVhLJYR8lG8NAbPN9PU=";
2021-07-07 12:37:38 +01:00
ldflags = [ "-s" "-w" ];
# Install completions post-install
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
mv $out/bin/fulcio $out/bin/fulcio-server
installShellCompletion --cmd fulcio-server \
--bash <($out/bin/fulcio-server completion bash) \
--fish <($out/bin/fulcio-server completion fish) \
--zsh <($out/bin/fulcio-server completion zsh)
2021-07-07 12:37:38 +01:00
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/fulcio-server --help
2021-07-07 12:37:38 +01:00
runHook postInstallCheck
'';
meta = with lib; {
homepage = "https://github.com/sigstore/fulcio";
changelog = "https://github.com/sigstore/fulcio/releases/tag/v${version}";
2021-07-07 12:37:38 +01:00
description = "A Root-CA for code signing certs - issuing certificates based on an OIDC email address";
license = licenses.asl20;
maintainers = with maintainers; [ lesuisse jk ];
};
}