@@ -0,0 +1,43 @@
1+{ lib
2+, fetchFromGitHub
3+, buildGoModule
4+, makeWrapper
5+, openssh
6+}:
7+
8+buildGoModule rec {
9+ pname = "bosh-cli";
10+
11+ version = "6.4.3";
12+
13+ src = fetchFromGitHub {
14+ owner = "cloudfoundry";
15+ repo = pname;
16+ rev = "v${version}";
17+ sha256 = "1glxwk0fv52rjim7ihcxkjx19fsn9k7gzg9zmwxgx8wpsjrdcq3f";
18+ };
19+ vendorSha256 = null;
20+
21+ postPatch = ''
22+ substituteInPlace cmd/version.go --replace '[DEV BUILD]' '${version}'
23+ '';
24+
25+ nativeBuildInputs = [ makeWrapper ];
26+
27+ subPackages = [ "." ];
28+
29+ doCheck = false;
30+
31+ postInstall = ''
32+ mv $out/bin/bosh-cli $out/bin/bosh
33+ wrapProgram $out/bin/bosh --prefix PATH : '${lib.makeBinPath [ openssh ]}'
34+ '';
35+
36+ meta = with lib; {
37+ description = "A command line interface to CloudFoundry BOSH";
38+ homepage = "https://bosh.io";
39+ changelog = "https://github.com/cloudfoundry/bosh-cli/releases/tag/v${version}";
40+ license = licenses.asl20;
41+ maintainers = with maintainers; [ ris ];
42+ };
43+}