2021-07-14 22:03:04 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fulcio";
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "0.1.1";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = pname;
|
2021-08-05 21:33:18 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-MvLQMGPyJYqYUljLqsr+qJeeYnxdH9aNGkWpDRvOeh8=";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
2021-08-05 21:33:18 +00:00
|
|
|
vendorSha256 = "sha256-pRL0et+UOi/tzuQz/Q7UmSA+pVhLJYR8lG8NAbPN9PU=";
|
2021-07-14 22:03:04 +00:00
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
|
|
|
# Install completions post-install
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2021-08-05 21:33:18 +00:00
|
|
|
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-14 22:03:04 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
2021-08-05 21:33:18 +00:00
|
|
|
$out/bin/fulcio-server --help
|
2021-07-14 22:03:04 +00:00
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/sigstore/fulcio";
|
2021-08-05 21:33:18 +00:00
|
|
|
changelog = "https://github.com/sigstore/fulcio/releases/tag/v${version}";
|
2021-07-14 22:03:04 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|