2023-10-09 19:29:22 +00:00
|
|
|
|
{ fetchFromGitHub
|
|
|
|
|
, lib
|
|
|
|
|
, buildGoModule
|
|
|
|
|
, makeWrapper
|
|
|
|
|
, coreutils
|
|
|
|
|
, git
|
|
|
|
|
, openssh
|
|
|
|
|
, bash
|
|
|
|
|
, gnused
|
|
|
|
|
, gnugrep
|
|
|
|
|
, gitUpdater
|
|
|
|
|
, nixosTests
|
|
|
|
|
}:
|
2020-11-03 02:18:15 +00:00
|
|
|
|
buildGoModule rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
|
pname = "buildkite-agent";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
version = "3.59.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "buildkite";
|
|
|
|
|
repo = "agent";
|
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
sha256 = "sha256-pYaxjXoNn6MOE2oHUSKrBzP5oKhtfJwSHFCkcpkyzas=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
|
vendorHash = "sha256-JSuam9Tn+ZekfLrj78tBncH7Q2aP4CaUgaaDkJ/azEw=";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
postPatch = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
|
substituteInPlace clicommand/agent_start.go --replace /bin/bash ${bash}/bin/bash
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
|
# Fix binary name
|
2020-05-15 21:57:56 +00:00
|
|
|
|
mv $out/bin/{agent,buildkite-agent}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
# These are runtime dependencies
|
2020-05-15 21:57:56 +00:00
|
|
|
|
wrapProgram $out/bin/buildkite-agent \
|
2021-02-05 17:12:51 +00:00
|
|
|
|
--prefix PATH : '${lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}'
|
2020-04-24 23:36:52 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
|
passthru = {
|
|
|
|
|
tests.smoke-test = nixosTests.buildkite-agents;
|
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
|
rev-prefix = "v";
|
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
description = "Build runner for buildkite.com";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
The buildkite-agent is a small, reliable, and cross-platform build runner
|
|
|
|
|
that makes it easy to run automated builds on your own infrastructure.
|
|
|
|
|
It’s main responsibilities are polling buildkite.com for work, running
|
|
|
|
|
build jobs, reporting back the status code and output log of the job,
|
|
|
|
|
and uploading the job's artifacts.
|
|
|
|
|
'';
|
|
|
|
|
homepage = "https://buildkite.com/docs/agent";
|
|
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
maintainers = with maintainers; [ pawelpacana zimbatm jsoo1 techknowlogick ];
|
2020-11-03 02:18:15 +00:00
|
|
|
|
platforms = with platforms; unix ++ darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|