Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

60 lines
1.4 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
stdenv,
versionCheckHook,
}:
buildGoModule rec {
pname = "conduktor-ctl";
version = "0.6.3";
src = fetchFromGitHub {
owner = "conduktor";
repo = "ctl";
rev = "refs/tags/v${version}";
hash = "sha256-zaguB4LLkzXlMQCEVOWkUUsEovU53F0B51w3BnVjre8=";
};
vendorHash = "sha256-h9NSOkqpkZ3sKcfsPjF+T2JgX0N8CIAP6y1NVIb/r0E=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [ "-X github.com/conduktor/ctl/utils.version=${version}" ];
checkPhase = ''
go test ./...
'';
postInstall = ''
mv $out/bin/ctl $out/bin/conduktor
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd conduktor \
--bash <($out/bin/conduktor completion bash) \
--fish <($out/bin/conduktor completion fish) \
--zsh <($out/bin/conduktor completion zsh)
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/conduktor";
versionCheckProgramArg = "version";
meta = {
description = "CLI tool to interact with the Conduktor Console and Gateway";
mainProgram = "conduktor";
homepage = "https://github.com/conduktor/ctl";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
conduktorbot
marnas
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}