1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5}:
6
7buildGoModule rec {
8 pname = "credhub-cli";
9 version = "2.9.48";
10
11 src = fetchFromGitHub {
12 owner = "cloudfoundry-incubator";
13 repo = "credhub-cli";
14 rev = version;
15 sha256 = "sha256-jZmnun7EkCWiWq8i+9cgn/2ffxt9VbVf0DxYHKgwNqg=";
16 };
17
18 # these tests require network access that we're not going to give them
19 postPatch = ''
20 rm commands/api_test.go
21 rm commands/socks5_test.go
22 '';
23 __darwinAllowLocalNetworking = true;
24
25 vendorHash = null;
26
27 ldflags = [
28 "-s"
29 "-w"
30 "-X code.cloudfoundry.org/credhub-cli/version.Version=${version}"
31 ];
32
33 postInstall = ''
34 ln -s $out/bin/credhub-cli $out/bin/credhub
35 '';
36
37 preCheck = ''
38 export HOME=$TMPDIR
39 '';
40
41 meta = with lib; {
42 description = "Provides a command line interface to interact with CredHub servers";
43 homepage = "https://github.com/cloudfoundry-incubator/credhub-cli";
44 maintainers = with maintainers; [ ris ];
45 license = licenses.asl20;
46 };
47}