9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "cirrus-cli";
|
|
version = "0.101.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cirruslabs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-jTQUBcS8JYyXmdYo4sxuGrtuOfkKCZa0OXjGu3wvQBw=";
|
|
};
|
|
|
|
vendorHash = "sha256-qYt3NRjlImRE/G2CUYTukOCP37slseYxiJGLFtZCiDk=";
|
|
|
|
ldflags = [
|
|
"-X github.com/cirruslabs/cirrus-cli/internal/version.Version=v${version}"
|
|
"-X github.com/cirruslabs/cirrus-cli/internal/version.Commit=v${version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
postInstall = ''
|
|
installShellCompletion --cmd cirrus \
|
|
--bash <($out/bin/cirrus completion bash) \
|
|
--zsh <($out/bin/cirrus completion zsh) \
|
|
--fish <($out/bin/cirrus completion fish)
|
|
'';
|
|
|
|
# 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";
|
|
license = licenses.agpl3Plus;
|
|
maintainers = with maintainers; [ techknowlogick ];
|
|
mainProgram = "cirrus";
|
|
};
|
|
}
|