depot/third_party/nixpkgs/pkgs/development/tools/continuous-integration/cirrus-cli/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

43 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, installShellFiles
}:
buildGoModule rec {
pname = "cirrus-cli";
version = "0.93.0";
src = fetchFromGitHub {
owner = "cirruslabs";
repo = pname;
rev = "v${version}";
sha256 = "sha256-exGOCBKPHuVBaFXd+/jbjAid7ZDodtZ/h/OWp/NBOhE=";
};
vendorSha256 = "sha256-gotc9M2UkRJtE4LZPCpqDTXQ/cnN4tk+3HG243tFoss=";
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.agpl3Only;
maintainers = with maintainers; [ techknowlogick ];
mainProgram = "cirrus";
};
}