base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / bu / buildkite-agent / package.nix
blobb2482372a9d17b3c0e3cb50bbeb87139b4d34aa5
1 { fetchFromGitHub
2 , lib
3 , buildGoModule
4 , makeWrapper
5 , coreutils
6 , git
7 , openssh
8 , bash
9 , gnused
10 , gnugrep
11 , gitUpdater
12 , nixosTests
14 buildGoModule rec {
15   pname = "buildkite-agent";
16   version = "3.86.0";
18   src = fetchFromGitHub {
19     owner = "buildkite";
20     repo = "agent";
21     rev = "v${version}";
22     hash = "sha256-qvwJ8NFFJbD9btTAs8x7V4tbDDo4L7O679XYp2t9MpE=";
23   };
25   vendorHash = "sha256-Ovi1xK+TtWli6ZG0s5Pu0JGAjtbyUWBgiKCBybVbcXk=";
27   postPatch = ''
28     substituteInPlace clicommand/agent_start.go --replace /bin/bash ${bash}/bin/bash
29   '';
31   nativeBuildInputs = [ makeWrapper ];
33   doCheck = false;
35   postInstall = ''
36     # Fix binary name
37     mv $out/bin/{agent,buildkite-agent}
39     # These are runtime dependencies
40     wrapProgram $out/bin/buildkite-agent \
41       --prefix PATH : '${lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}'
42   '';
44   passthru = {
45     tests.smoke-test = nixosTests.buildkite-agents;
46     updateScript = gitUpdater {
47       rev-prefix = "v";
48     };
49   };
51   meta = with lib; {
52     description = "Build runner for buildkite.com";
53     longDescription = ''
54       The buildkite-agent is a small, reliable, and cross-platform build runner
55       that makes it easy to run automated builds on your own infrastructure.
56       It’s main responsibilities are polling buildkite.com for work, running
57       build jobs, reporting back the status code and output log of the job,
58       and uploading the job's artifacts.
59     '';
60     homepage = "https://buildkite.com/docs/agent";
61     license = licenses.mit;
62     maintainers = with maintainers; [ pawelpacana zimbatm jsoo1 techknowlogick ];
63     platforms = with platforms; unix ++ darwin;
64   };