Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

59 lines
1.5 KiB
Nix

{
buildGoModule,
fetchFromGitHub,
installShellFiles,
lib,
stdenv,
}:
buildGoModule rec {
pname = "go-passbolt-cli";
version = "0.3.2";
src = fetchFromGitHub {
owner = "passbolt";
repo = "go-passbolt-cli";
rev = "v${version}";
hash = "sha256-BtMPOmp9dbi/HoNigEeGWIYXRh1/gorV8ycrtWw9I8s=";
};
vendorHash = "sha256-wGSrhW7OsSjHlSKLkOf2AYIxU1m2lM1WGUsy16qxBwA=";
ldflags = [
"-X=main.version=${version}"
"-X=main.commit=${src.rev}"
"-X=main.date=1970-01-01T00:00:00Z"
];
subPackages = [ "." ];
nativeBuildInputs = [
installShellFiles
];
installPhase = ''
runHook preInstall
install -D $GOPATH/bin/go-passbolt-cli $out/bin/passbolt
runHook postInstall
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd passbolt \
--bash <($out/bin/passbolt completion bash) \
--fish <($out/bin/passbolt completion fish) \
--zsh <($out/bin/passbolt completion zsh)
export tmpDir=$(mktemp -d)
cd $tmpDir && mkdir man && $out/bin/passbolt gendoc --type man && installManPage man/*
'';
meta = with lib; {
description = "CLI tool to interact with Passbolt, an open source password manager for teams";
homepage = "https://github.com/passbolt/go-passbolt-cli";
license = licenses.mit;
maintainers = with maintainers; [ pbek ];
mainProgram = "passbolt";
platforms = platforms.linux ++ platforms.darwin;
};
}