audiobookshelf: 2.18.1 -> 2.19.0 (#378967)
[NixPkgs.git] / pkgs / by-name / bu / buildkite-agent / package.nix
bloba846606d836e8f8a738e35e73ddfc130a8369d36
2   fetchFromGitHub,
3   lib,
4   buildGoModule,
5   makeWrapper,
6   coreutils,
7   git,
8   openssh,
9   bash,
10   gnused,
11   gnugrep,
12   gitUpdater,
13   nixosTests,
15 buildGoModule rec {
16   pname = "buildkite-agent";
17   version = "3.87.1";
19   src = fetchFromGitHub {
20     owner = "buildkite";
21     repo = "agent";
22     rev = "v${version}";
23     hash = "sha256-L7ruto57E4uUEwo18krZgCQYl+9aJoIGgeecNEeVt54=";
24   };
26   vendorHash = "sha256-Snms9jzQ8+Tw+pJJth7AndskebF31bHKviJBA6Qu52I=";
28   postPatch = ''
29     substituteInPlace clicommand/agent_start.go --replace /bin/bash ${bash}/bin/bash
30   '';
32   nativeBuildInputs = [ makeWrapper ];
34   doCheck = false;
36   postInstall = ''
37     # Fix binary name
38     mv $out/bin/{agent,buildkite-agent}
40     # These are runtime dependencies
41     wrapProgram $out/bin/buildkite-agent \
42       --prefix PATH : '${
43         lib.makeBinPath [
44           openssh
45           git
46           coreutils
47           gnused
48           gnugrep
49         ]
50       }'
51   '';
53   passthru = {
54     tests.smoke-test = nixosTests.buildkite-agents;
55     updateScript = gitUpdater {
56       rev-prefix = "v";
57     };
58   };
60   meta = with lib; {
61     description = "Build runner for buildkite.com";
62     longDescription = ''
63       The buildkite-agent is a small, reliable, and cross-platform build runner
64       that makes it easy to run automated builds on your own infrastructure.
65       It’s main responsibilities are polling buildkite.com for work, running
66       build jobs, reporting back the status code and output log of the job,
67       and uploading the job's artifacts.
68     '';
69     homepage = "https://buildkite.com/docs/agent";
70     license = licenses.mit;
71     maintainers = with maintainers; [
72       pawelpacana
73       zimbatm
74       jsoo1
75       techknowlogick
76     ];
77     platforms = with platforms; unix ++ darwin;
78   };