2024-07-06 12:38:30 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-11-19 15:07:47 +00:00
|
|
|
stdenv,
|
2024-07-06 12:38:30 +00:00
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
2024-11-19 15:07:47 +00:00
|
|
|
installShellFiles,
|
|
|
|
buildPackages,
|
2024-07-06 12:38:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "spacectl";
|
2024-10-20 02:34:32 +00:00
|
|
|
version = "1.6.0";
|
2024-07-06 12:38:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "spacelift-io";
|
|
|
|
repo = "spacectl";
|
|
|
|
rev = "v${version}";
|
2024-10-20 02:34:32 +00:00
|
|
|
hash = "sha256-pO+jYuCyP6YrU9vE3//O0EyTDXYQ1WSpFI/8WbneDCA=";
|
2024-07-06 12:38:30 +00:00
|
|
|
};
|
|
|
|
|
2024-09-16 03:03:57 +00:00
|
|
|
vendorHash = "sha256-SYfXG6YM0Q2rCnoTM2tYvE17uBCD8yQiW/5DTCxMPWo=";
|
2024-07-06 12:38:30 +00:00
|
|
|
|
2024-11-19 15:07:47 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
let
|
|
|
|
emulator = stdenv.hostPlatform.emulator buildPackages;
|
|
|
|
in
|
|
|
|
''
|
|
|
|
installShellCompletion --cmd spacectl \
|
|
|
|
--bash <(${emulator} $out/bin/spacectl completion bash) \
|
|
|
|
--fish <(${emulator} $out/bin/spacectl completion fish) \
|
|
|
|
--zsh <(${emulator} $out/bin/spacectl completion zsh) \
|
|
|
|
'';
|
|
|
|
|
2024-07-06 12:38:30 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/spacelift-io/spacectl";
|
|
|
|
description = "Spacelift client and CLI";
|
|
|
|
changelog = "https://github.com/spacelift-io/spacectl/releases/tag/v${version}";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ kashw2 ];
|
|
|
|
mainProgram = "spacectl";
|
|
|
|
};
|
|
|
|
}
|