2023-08-10 07:59:29 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
, installShellFiles
|
2023-08-10 07:59:29 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "zitadel-tools";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.5.0";
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zitadel";
|
|
|
|
repo = "zitadel-tools";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-wtCBRsP0b7qPOQfYgvmgDT0t2zZHocokO5J8yLZcsgQ=";
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-ql5Qw5Va/wLBKsb9bCmPciuVrgORU8nndRkhjoJBIgs=";
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +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-08-10 07:59:29 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Helper tools for zitadel";
|
|
|
|
homepage = "https://github.com/zitadel/zitadel-tools";
|
|
|
|
license = licenses.asl20;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "zitadel-tools";
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
|
|
|
}
|