nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchFromGitHub, buildGoModule }:
2
3buildGoModule rec {
4 pname = "circleci-cli";
5 version = "0.1.5879";
6
7 src = fetchFromGitHub {
8 owner = "CircleCI-Public";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "1471g56apaw0c5dpa0jrr7hvzh3kbwfr3yr0m4mz2dlf27d481ac";
12 };
13
14 modSha256 = "0cvmcsl00jfikpkw3f7k5zw65156z5g5l2b6s5803a2i9d613268";
15
16 preBuild = ''
17 substituteInPlace data/data.go \
18 --replace 'packr.New("circleci-cli-box", "../_data")' 'packr.New("circleci-cli-box", "${placeholder "out"}/share/circleci-cli")'
19 '';
20
21 postInstall = ''
22 install -Dm644 -t $out/share/circleci-cli _data/data.yml
23 '';
24
25 meta = with stdenv.lib; {
26 # Box blurb edited from the AUR package circleci-cli
27 description = ''
28 Command to enable you to reproduce the CircleCI environment locally and
29 run jobs as if they were running on the hosted CirleCI application.
30 '';
31 maintainers = with maintainers; [ synthetica ];
32 license = licenses.mit;
33 homepage = https://circleci.com/;
34 };
35}