nixpkgs/pkgs/by-name/sp/spacectl/package.nix

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

45 lines
1.1 KiB
Nix
Raw Normal View History

2024-07-06 12:38:30 +00:00
{
lib,
stdenv,
2024-07-06 12:38:30 +00:00
buildGoModule,
fetchFromGitHub,
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
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";
};
}