depot/third_party/nixpkgs/pkgs/development/tools/continuous-integration/cirrus-cli/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

43 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, installShellFiles
}:
buildGoModule rec {
pname = "cirrus-cli";
version = "0.116.0";
src = fetchFromGitHub {
owner = "cirruslabs";
repo = pname;
rev = "v${version}";
sha256 = "sha256-cij6Yw8UEPDHsm9Oy809PWxfPpbCGXUFRALKFH80pqM=";
};
vendorHash = "sha256-tkKxg08uL1vlOyD/tpRLzjHpOVWOmYZxcq8B+Q7/3Zo=";
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";
};
}