Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5 installShellFiles, 6}: 7 8buildGoModule rec { 9 pname = "circleci-cli"; 10 version = "0.1.32638"; 11 12 src = fetchFromGitHub { 13 owner = "CircleCI-Public"; 14 repo = "circleci-cli"; 15 rev = "v${version}"; 16 sha256 = "sha256-cKW8jJdKiFkCR5RRMMlmzq8G+SvIXzzkNIbQXh77wro="; 17 }; 18 19 vendorHash = "sha256-RQK51VSag1AkJMa/rmWpSuuzhRqSG2a3+sNisp0q7lU="; 20 21 nativeBuildInputs = [ installShellFiles ]; 22 23 doCheck = false; 24 25 ldflags = [ 26 "-s" 27 "-w" 28 "-X github.com/CircleCI-Public/circleci-cli/version.Version=${version}" 29 "-X github.com/CircleCI-Public/circleci-cli/version.Commit=${src.rev}" 30 "-X github.com/CircleCI-Public/circleci-cli/version.packageManager=nix" 31 ]; 32 33 postInstall = '' 34 mv $out/bin/circleci-cli $out/bin/circleci 35 36 installShellCompletion --cmd circleci \ 37 --bash <(HOME=$TMPDIR $out/bin/circleci completion bash --skip-update-check) \ 38 --zsh <(HOME=$TMPDIR $out/bin/circleci completion zsh --skip-update-check) 39 ''; 40 41 meta = with lib; { 42 # Box blurb edited from the AUR package circleci-cli 43 description = '' 44 Command to enable you to reproduce the CircleCI environment locally and 45 run jobs as if they were running on the hosted CirleCI application. 46 ''; 47 maintainers = with maintainers; [ synthetica ]; 48 mainProgram = "circleci"; 49 license = licenses.mit; 50 homepage = "https://circleci.com/"; 51 }; 52}