nixpkgs/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix
Paweł Pacana d2b58dd39a buildkite-agent: init at 2.1.8
* nixos module included
* install compiled binary
* only one platform now
* limited config options
* relies on providing ssh keys for agent
2016-06-13 17:21:08 +01:00

44 lines
1.5 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ stdenv, fetchurl, makeWrapper, coreutils, git, openssh, bash, gnused, gnugrep }:
stdenv.mkDerivation rec {
version = "2.1.8";
name = "buildkite-agent-${version}";
dontBuild = true;
src = fetchurl {
url = "https://github.com/buildkite/agent/releases/download/v${version}/buildkite-agent-linux-386-${version}.tar.gz";
sha256 = "f54ca7da4379180700f5038779a7cbb1cef31d49f4a06c42702d68c34387c242";
};
nativeBuildInputs = [ makeWrapper ];
sourceRoot = ".";
installPhase = ''
install -Dt "$out/bin/" buildkite-agent
mkdir -p $out/share
mv hooks bootstrap.sh $out/share/
'';
postFixup = ''
substituteInPlace $out/share/bootstrap.sh \
--replace "#!/bin/bash" "#!$(type -P bash)"
wrapProgram $out/bin/buildkite-agent \
--set PATH '"${openssh}/bin/:${git}/bin:${coreutils}/bin:${gnused}/bin:${gnugrep}/bin:$PATH"'
'';
meta = {
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.
Its 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 = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.pawelpacana ];
platforms = stdenv.lib.platforms.linux;
};
}