2021-07-07 12:37:38 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fulcio";
|
2021-07-27 09:24:48 +01:00
|
|
|
version = "0.1.1";
|
2021-07-07 12:37:38 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sigstore";
|
|
|
|
repo = pname;
|
2021-07-27 09:24:48 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-MvLQMGPyJYqYUljLqsr+qJeeYnxdH9aNGkWpDRvOeh8=";
|
2021-07-07 12:37:38 +01:00
|
|
|
};
|
2021-07-27 09:24:48 +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 = ''
|
2021-07-27 09:24:48 +01: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-07 12:37:38 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
2021-07-27 09:24:48 +01:00
|
|
|
$out/bin/fulcio-server --help
|
2021-07-07 12:37:38 +01:00
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/sigstore/fulcio";
|
2021-07-27 09:24:48 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|