10 pname = "go-passbolt-cli";
13 src = fetchFromGitHub {
15 repo = "go-passbolt-cli";
17 hash = "sha256-I+niNUowKTFDMa7yOnRToMFPzO/CbnjXHJr5nAhhHcg=";
20 vendorHash = "sha256-XRHGq3Qeq7VWHzw5WWVv4x5orQu740lttGVreiu7qP4=";
23 "-X=main.version=${version}"
24 "-X=main.commit=${src.rev}"
25 "-X=main.date=1970-01-01T00:00:00Z"
28 subPackages = [ "." ];
36 install -D $GOPATH/bin/go-passbolt-cli $out/bin/passbolt
40 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
41 installShellCompletion --cmd passbolt \
42 --bash <($out/bin/passbolt completion bash) \
43 --fish <($out/bin/passbolt completion fish) \
44 --zsh <($out/bin/passbolt completion zsh)
46 export tmpDir=$(mktemp -d)
47 cd $tmpDir && mkdir man && $out/bin/passbolt gendoc --type man && installManPage man/*
51 description = "CLI tool to interact with Passbolt, an open source password manager for teams";
52 homepage = "https://github.com/passbolt/go-passbolt-cli";
53 license = licenses.mit;
54 maintainers = with maintainers; [ pbek ];
55 mainProgram = "passbolt";
56 platforms = platforms.linux ++ platforms.darwin;