nixpkgs/pkgs/tools/misc/zitadel-tools/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1021 B
Nix
Raw Normal View History

2023-05-27 20:59:12 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
2023-10-24 17:57:08 +00:00
, installShellFiles
2023-05-27 20:59:12 +00:00
}:
buildGoModule rec {
pname = "zitadel-tools";
2023-10-24 07:58:07 +00:00
version = "0.4.1";
2023-05-27 20:59:12 +00:00
src = fetchFromGitHub {
owner = "zitadel";
repo = "zitadel-tools";
rev = "v${version}";
2023-10-24 07:58:07 +00:00
hash = "sha256-r9GEHpfDlpK98/dnsxjhUgWKn6vHQla8Z+jQUVrHGyo=";
2023-05-27 20:59:12 +00:00
};
2023-10-24 17:57:08 +00:00
nativeBuildInputs = [ installShellFiles ];
2023-10-24 07:58:07 +00:00
vendorHash = "sha256-y2PYj0XRSgfiaYpeqAh4VR/+NKUPKd1c0w9pPCWsUrY=";
2023-05-27 20:59:12 +00:00
ldflags = [
"-s" "-w"
"-X main.version=${version}"
];
2023-10-24 17:57:08 +00:00
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)
'';
2023-05-27 20:59:12 +00:00
meta = with lib; {
description = "Helper tools for zitadel";
homepage = "https://github.com/zitadel/zitadel-tools";
license = licenses.asl20;
maintainers = with maintainers; [ janik ];
2023-11-27 01:17:53 +00:00
mainProgram = "zitadel-tools";
2023-05-27 20:59:12 +00:00
};
}