2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
2022-12-17 10:02:37 +00:00
|
|
|
, installShellFiles
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "cirrus-cli";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.119.1";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cirruslabs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
sha256 = "sha256-nEGeh0ZTYE4Ff0x+1G38KUFcUsr39kvM8QUfmHCFyK4=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
vendorHash = "sha256-rL4bXt6VBG2b9nZ1M2FF6E8ODPT3UF4aRHSJqpVWyTw=";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-X github.com/cirruslabs/cirrus-cli/internal/version.Version=v${version}"
|
|
|
|
"-X github.com/cirruslabs/cirrus-cli/internal/version.Commit=v${version}"
|
|
|
|
];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd cirrus \
|
|
|
|
--bash <($out/bin/cirrus completion bash) \
|
|
|
|
--zsh <($out/bin/cirrus completion zsh) \
|
|
|
|
--fish <($out/bin/cirrus completion fish)
|
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
# tests fail on read-only filesystem
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI for executing Cirrus tasks locally and in any CI";
|
|
|
|
homepage = "https://github.com/cirruslabs/cirrus-cli";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.agpl3Plus;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ techknowlogick ];
|
|
|
|
mainProgram = "cirrus";
|
|
|
|
};
|
|
|
|
}
|