2023-07-28 19:52:55 +01:00
|
|
|
|
{ fetchFromGitHub
|
|
|
|
|
, lib
|
|
|
|
|
, buildGoModule
|
|
|
|
|
, makeWrapper
|
|
|
|
|
, coreutils
|
|
|
|
|
, git
|
|
|
|
|
, openssh
|
|
|
|
|
, bash
|
|
|
|
|
, gnused
|
|
|
|
|
, gnugrep
|
|
|
|
|
, gitUpdater
|
|
|
|
|
, nixosTests
|
|
|
|
|
}:
|
2020-10-28 22:43:24 +00:00
|
|
|
|
buildGoModule rec {
|
2022-02-01 22:01:51 +00:00
|
|
|
|
pname = "buildkite-agent";
|
2024-08-08 11:21:33 +01:00
|
|
|
|
version = "3.77.0";
|
2018-09-26 18:57:32 +01:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "buildkite";
|
|
|
|
|
repo = "agent";
|
|
|
|
|
rev = "v${version}";
|
2024-08-08 11:21:33 +01:00
|
|
|
|
sha256 = "sha256-QsSCIAy0ekkZiqO/cFcPNNkXa3FLL3Z1LJoKsjzB6jw=";
|
2018-09-26 18:57:32 +01:00
|
|
|
|
};
|
2020-10-28 22:43:24 +00:00
|
|
|
|
|
2024-08-08 11:21:33 +01:00
|
|
|
|
vendorHash = "sha256-xp836ZT2x20ZbkTEubhiZlLmK9n2F8mCSWZTHmAuu6A=";
|
2020-10-28 22:43:24 +00:00
|
|
|
|
|
2018-09-26 18:57:32 +01:00
|
|
|
|
postPatch = ''
|
2023-07-28 19:43:28 +01:00
|
|
|
|
substituteInPlace clicommand/agent_start.go --replace /bin/bash ${bash}/bin/bash
|
2018-09-26 18:57:32 +01:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
2020-10-28 22:43:24 +00:00
|
|
|
|
doCheck = false;
|
2018-09-26 18:57:32 +01:00
|
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
|
# Fix binary name
|
2020-04-28 02:50:57 +01:00
|
|
|
|
mv $out/bin/{agent,buildkite-agent}
|
2018-09-26 18:57:32 +01:00
|
|
|
|
|
|
|
|
|
# These are runtime dependencies
|
2020-04-28 02:50:57 +01:00
|
|
|
|
wrapProgram $out/bin/buildkite-agent \
|
2021-01-23 12:26:19 +00:00
|
|
|
|
--prefix PATH : '${lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}'
|
2018-09-26 18:57:32 +01:00
|
|
|
|
'';
|
|
|
|
|
|
2023-07-28 18:34:43 +01:00
|
|
|
|
passthru = {
|
|
|
|
|
tests.smoke-test = nixosTests.buildkite-agents;
|
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
|
rev-prefix = "v";
|
|
|
|
|
};
|
2021-04-03 23:32:05 +01:00
|
|
|
|
};
|
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
|
meta = with lib; {
|
2018-09-26 18:57:32 +01: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.
|
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "https://buildkite.com/docs/agent";
|
2018-09-26 18:57:32 +01:00
|
|
|
|
license = licenses.mit;
|
2023-07-28 19:43:28 +01:00
|
|
|
|
maintainers = with maintainers; [ pawelpacana zimbatm jsoo1 techknowlogick ];
|
2020-10-28 22:43:24 +00:00
|
|
|
|
platforms = with platforms; unix ++ darwin;
|
2018-09-26 18:57:32 +01:00
|
|
|
|
};
|
|
|
|
|
}
|