Merge pull request #191178 from avdv/circleci-binary

circleci-cli: rename executable to `circleci`
This commit is contained in:
superherointj 2022-09-14 20:51:35 -03:00 committed by GitHub
commit c1e37f8517
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, buildGoModule }:
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
buildGoModule rec {
pname = "circleci-cli";
@ -13,10 +13,20 @@ buildGoModule rec {
vendorSha256 = "sha256-jrAd1G/NCjXfaJmzOhMjMZfJoGHsQ1bi3HudBM0e8rE=";
nativeBuildInputs = [ installShellFiles ];
doCheck = false;
ldflags = [ "-s" "-w" "-X github.com/CircleCI-Public/circleci-cli/version.Version=${version}" "-X github.com/CircleCI-Public/circleci-cli/version.Commit=${src.rev}" "-X github.com/CircleCI-Public/circleci-cli/version.packageManager=nix" ];
postInstall = ''
mv $out/bin/circleci-cli $out/bin/circleci
installShellCompletion --cmd circleci \
--bash <($out/bin/circleci completion bash --skip-update-check) \
--zsh <($out/bin/circleci completion zsh --skip-update-check)
'';
meta = with lib; {
# Box blurb edited from the AUR package circleci-cli
description = ''
@ -24,6 +34,7 @@ buildGoModule rec {
run jobs as if they were running on the hosted CirleCI application.
'';
maintainers = with maintainers; [ synthetica ];
mainProgram = "circleci";
license = licenses.mit;
homepage = "https://circleci.com/";
};