depot/third_party/nixpkgs/pkgs/tools/misc/zitadel-tools/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

42 lines
997 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "zitadel-tools";
version = "0.4.1";
src = fetchFromGitHub {
owner = "zitadel";
repo = "zitadel-tools";
rev = "v${version}";
hash = "sha256-r9GEHpfDlpK98/dnsxjhUgWKn6vHQla8Z+jQUVrHGyo=";
};
nativeBuildInputs = [ installShellFiles ];
vendorHash = "sha256-y2PYj0XRSgfiaYpeqAh4VR/+NKUPKd1c0w9pPCWsUrY=";
ldflags = [
"-s" "-w"
"-X main.version=${version}"
];
postInstall = ''
local INSTALL="$out/bin/zitadel-tools"
installShellCompletion --cmd zitadel-tools \
--bash <($out/bin/zitadel-tools completion bash) \
--fish <($out/bin/zitadel-tools completion fish) \
--zsh <($out/bin/zitadel-tools completion zsh)
'';
meta = with lib; {
description = "Helper tools for zitadel";
homepage = "https://github.com/zitadel/zitadel-tools";
license = licenses.asl20;
maintainers = [ ];
mainProgram = "zitadel-tools";
};
}