e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "cirrus-cli";
|
|
version = "0.108.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cirruslabs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-3vlhT/BevVg0GSHNT/g4aomdgj/6Od3WiUywhdsfySE=";
|
|
};
|
|
|
|
vendorHash = "sha256-2PlgTvGCNB7kfpM4CeBQJkSmtvX1zkA53pSvh8VwuEk=";
|
|
|
|
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";
|
|
};
|
|
}
|