2022-09-22 12:36:57 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "circleci-cli";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "0.1.23391";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CircleCI-Public";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
sha256 = "sha256-mTqrckoYbxtlwonXp6mtbXSpmVB3WfSXaOkyycBVjx0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
vendorHash = "sha256-7k5jmXvNtxezialavNz8NM7esl2vpXcjRW2n/9GAycs=";
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
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" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/circleci-cli $out/bin/circleci
|
|
|
|
|
|
|
|
installShellCompletion --cmd circleci \
|
|
|
|
--bash <(HOME=$TMPDIR $out/bin/circleci completion bash --skip-update-check) \
|
|
|
|
--zsh <(HOME=$TMPDIR $out/bin/circleci completion zsh --skip-update-check)
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
# 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 ];
|
2022-09-22 12:36:57 +00:00
|
|
|
mainProgram = "circleci";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://circleci.com/";
|
|
|
|
};
|
2020-06-15 15:56:04 +00:00
|
|
|
}
|