2021-06-11 14:15:20 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, makeWrapper
|
|
|
|
, openssh
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "bosh-cli";
|
|
|
|
|
2021-09-14 03:40:49 +01:00
|
|
|
version = "6.4.6";
|
2021-06-11 14:15:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cloudfoundry";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-14 03:40:49 +01:00
|
|
|
sha256 = "sha256-MNM8gyi7L00OSf2EIEQFAlH7oMrcZSubf6tWcgJJMeQ=";
|
2021-06-11 14:15:20 +01:00
|
|
|
};
|
|
|
|
vendorSha256 = null;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace cmd/version.go --replace '[DEV BUILD]' '${version}'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/bosh-cli $out/bin/bosh
|
|
|
|
wrapProgram $out/bin/bosh --prefix PATH : '${lib.makeBinPath [ openssh ]}'
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A command line interface to CloudFoundry BOSH";
|
|
|
|
homepage = "https://bosh.io";
|
|
|
|
changelog = "https://github.com/cloudfoundry/bosh-cli/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ris ];
|
|
|
|
};
|
|
|
|
}
|