2018-07-13 11:00:09 +01:00
|
|
|
{ stdenv, fetchFromGitHub, docker, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "circleci-cli";
|
2018-07-22 15:17:34 +01:00
|
|
|
version = "0.1.0";
|
2018-07-13 11:00:09 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "circleci";
|
|
|
|
repo = "local-cli";
|
2018-07-22 15:17:34 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1bv1ck5zvyl6pyvbfglizg8ybna4yg2nz441kiv5rmp4g27n6db2";
|
2018-07-13 11:00:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$out/bin/"
|
|
|
|
cp "$src/circleci.sh" "$out/bin/circleci"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/circleci \
|
|
|
|
--prefix "PATH" : "${docker}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
# Box blurb edited from the AUR package circleci-cli
|
|
|
|
description = ''
|
|
|
|
Command to enable you to reproduce the CircleCI environment locally and
|
|
|
|
run jobs as if they were running on the hosted CirleCI application.
|
|
|
|
'';
|
|
|
|
maintainers = with maintainers; [ synthetica ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = https://circleci.com/;
|
|
|
|
};
|
|
|
|
}
|