Files
nixpkgs/pkgs/by-name/sp/spacectl/package.nix
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

45 lines
1.1 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
buildPackages,
}:
buildGoModule rec {
pname = "spacectl";
version = "1.16.0";
src = fetchFromGitHub {
owner = "spacelift-io";
repo = "spacectl";
rev = "v${version}";
hash = "sha256-ZtM3A09cQ7BqIYcEJTggunxRidXiu/xlsp9F8qIwSv0=";
};
vendorHash = "sha256-g5Y6NuG8z2Pnh3Ng690FcwOrEU2EOhftZbM8oUFj4B4=";
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) \
'';
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";
};
}