1 { buildGoModule, fetchFromGitHub, installShellFiles, lib, stdenv }:
4 pname = "go-passbolt-cli";
7 src = fetchFromGitHub {
9 repo = "go-passbolt-cli";
11 hash = "sha256-I+niNUowKTFDMa7yOnRToMFPzO/CbnjXHJr5nAhhHcg=";
14 vendorHash = "sha256-XRHGq3Qeq7VWHzw5WWVv4x5orQu740lttGVreiu7qP4=";
17 "-X=main.version=${version}"
18 "-X=main.commit=${src.rev}"
19 "-X=main.date=1970-01-01T00:00:00Z"
22 subPackages = [ "." ];
30 install -D $GOPATH/bin/go-passbolt-cli $out/bin/passbolt
34 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
35 installShellCompletion --cmd passbolt \
36 --bash <($out/bin/passbolt completion bash) \
37 --fish <($out/bin/passbolt completion fish) \
38 --zsh <($out/bin/passbolt completion zsh)
40 export tmpDir=$(mktemp -d)
41 cd $tmpDir && mkdir man && $out/bin/passbolt gendoc --type man && installManPage man/*
45 description = "CLI tool to interact with Passbolt, an open source password manager for teams";
46 homepage = "https://github.com/passbolt/go-passbolt-cli";
47 license = licenses.mit;
48 maintainers = with maintainers; [ pbek ];
49 mainProgram = "passbolt";
50 platforms = platforms.linux ++ platforms.darwin;