blob: 936ed7ec73ca2bca4cedc0dfca2c7946c5ae2e1f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
{ lib, buildGoModule, fetchFromGitHub, fetchurl, installShellFiles }:
buildGoModule rec {
pname = "cloudfoundry-cli";
version = "8.7.11";
src = fetchFromGitHub {
owner = "cloudfoundry";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-7FYIJf9vNHK9u8r7HVpPtGGWwRA5cdrB9f1Vz1iTFjI=";
};
vendorHash = "sha256-9SpmMXmocwaZH4fqqETzmRP6wvI2NV/LL6M0Ld4lvso=";
subPackages = [ "." ];
# upstream have helpfully moved the bash completion script to a separate
# repo which receives no releases or even tags
bashCompletionScript = fetchurl {
url = "https://raw.githubusercontent.com/cloudfoundry/cli-ci/5f4f0d5d01e89c6333673f0fa96056749e71b3cd/ci/installers/completion/cf8";
sha256 = "06w26kpnjd3f2wdjhb4pp0kaq2gb9kf87v7pjd9n2g7s7qhdqyhy";
};
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X code.cloudfoundry.org/cli/version.binaryBuildDate=1970-01-01"
"-X code.cloudfoundry.org/cli/version.binaryVersion=${version}"
];
postInstall = ''
mv "$out/bin/cli" "$out/bin/cf"
installShellCompletion --bash $bashCompletionScript
'';
meta = with lib; {
description = "Official command line client for Cloud Foundry";
homepage = "https://github.com/cloudfoundry/cli";
maintainers = with maintainers; [ ris ];
mainProgram = "cf";
license = licenses.asl20;
};
}
|