2021-02-05 17:12:51 +00:00
|
|
|
|
{ fetchFromGitHub, lib, buildGoModule,
|
2021-05-20 23:08:51 +00:00
|
|
|
|
makeWrapper, coreutils, git, openssh, bash, gnused, gnugrep,
|
|
|
|
|
nixosTests }:
|
2020-11-03 02:18:15 +00:00
|
|
|
|
buildGoModule rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
|
pname = "buildkite-agent";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
version = "3.37.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "buildkite";
|
|
|
|
|
repo = "agent";
|
|
|
|
|
rev = "v${version}";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
sha256 = "sha256-fjPMf9upHksijVApXgXumxCueI7huWRqQsIyAx7BCpI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
|
vendorSha256 = "sha256-BV5GUqv3u3kE4qOkEBmc3mGFJHqrGRxwObEY4PzRboA=";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace bootstrap/shell/shell.go --replace /bin/bash ${bash}/bin/bash
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
|
passthru.tests = {
|
|
|
|
|
smoke-test = nixosTests.buildkite-agents;
|
|
|
|
|
};
|
|
|
|
|
|
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;
|
2022-04-15 01:41:22 +00:00
|
|
|
|
maintainers = with maintainers; [ pawelpacana zimbatm rvl techknowlogick ];
|
2020-11-03 02:18:15 +00:00
|
|
|
|
platforms = with platforms; unix ++ darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|