Skip to content

Commit

Permalink
Merge pull request #191178 from avdv/circleci-binary
Browse files Browse the repository at this point in the history
circleci-cli: rename executable to `circleci`
  • Loading branch information
superherointj committed Sep 14, 2022
2 parents 7f3ee0f + 0620a73 commit c1e37f8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion pkgs/development/tools/misc/circleci-cli/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, buildGoModule }:
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:

buildGoModule rec {
pname = "circleci-cli";
Expand All @@ -13,17 +13,28 @@ 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 = ''
Command to enable you to reproduce the CircleCI environment locally and
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/";
};
Expand Down

0 comments on commit c1e37f8

Please sign in to comment.