2021-02-05 17:12:51 +00:00
|
|
|
|
{ fetchFromGitHub, lib, buildGoModule,
|
2020-04-24 23:36:52 +00:00
|
|
|
|
makeWrapper, coreutils, git, openssh, bash, gnused, gnugrep }:
|
2020-11-03 02:18:15 +00:00
|
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
name = "buildkite-agent-${version}";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
version = "3.29.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "buildkite";
|
|
|
|
|
repo = "agent";
|
|
|
|
|
rev = "v${version}";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
sha256 = "sha256-76yyqZi+ktcwRXo0ZIcdFJ9YCuHm9Te4AI+4meuhMNA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
2020-11-03 02:18:15 +00:00
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
|
vendorSha256 = "sha256-6cejbCbr0Rn4jWFJ0fxG4v0L0xUM8k16cbACmcQ6m4o=";
|
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-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;
|
|
|
|
|
maintainers = with maintainers; [ pawelpacana zimbatm rvl ];
|
2020-11-03 02:18:15 +00:00
|
|
|
|
platforms = with platforms; unix ++ darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
};
|
|
|
|
|
}
|