2017-11-24 13:12:47 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, go }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
name = "cloudfoundry-cli-${version}";
|
2018-07-22 21:21:47 +02:00
|
|
|
version = "6.37.0";
|
2017-11-24 13:12:47 +01:00
|
|
|
|
|
|
|
goPackagePath = "code.cloudfoundry.org/cli";
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-04-21 21:57:22 +02:00
|
|
|
owner = "cloudfoundry";
|
|
|
|
repo = "cli";
|
2017-11-24 13:12:47 +01:00
|
|
|
rev = "v${version}";
|
2018-07-22 21:21:47 +02:00
|
|
|
sha256 = "1v4f1fyydpzkfir46g4ppbf3zmk3ym6kxswpkdjls8h3dbb2fbnv";
|
2017-11-24 13:12:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
2018-07-22 21:21:47 +02:00
|
|
|
buildPhase = ''
|
|
|
|
cd go/src/${goPackagePath}
|
|
|
|
CF_BUILD_DATE="1970-01-01" make build
|
2017-11-24 13:12:47 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-07-22 21:21:47 +02:00
|
|
|
install -Dm555 out/cf "$out/bin/cf"
|
2017-11-24 13:12:47 +01:00
|
|
|
remove-references-to -t ${go} "$out/bin/cf"
|
|
|
|
install -Dm444 -t "$out/share/bash-completion/completions/" "$src/ci/installers/completion/cf"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "The official command line client for Cloud Foundry";
|
|
|
|
homepage = https://github.com/cloudfoundry/cli;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|