git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107454 from risicle/ris-credhub-cli

credhub-cli: init at 2.9.0

commit23c1004704d0dd50db4228008c847fd828233a41 authorRobert Scott <code@humanleg.org.uk> dateSun 27 Dec 2020, 00:51 (6 years ago) parentce8a3f7c5760e4
2 files changed+48
pkgs/tools/admin/credhub-cli/default.nix+44 pkgs/top-level/all-packages.nix+4
pkgs/tools/admin/credhub-cli/default.nixnew file+44
@@ -0,0 +1,44 @@
1+{ stdenv, buildGoModule, fetchFromGitHub }:
2+
3+buildGoModule rec {
4+ pname = "credhub-cli";
5+ version = "2.9.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "cloudfoundry-incubator";
9+ repo = "credhub-cli";
10+ rev = version;
11+ sha256 = "1j0i0b79ph2i52cj0qln8wvp6gwhl73akkn026h27vvmlw9sndc2";
12+ };
13+
14+ # these tests require network access that we're not going to give them
15+ postPatch = ''
16+ rm commands/api_test.go
17+ rm commands/socks5_test.go
18+ '';
19+ __darwinAllowLocalNetworking = true;
20+
21+ vendorSha256 = null;
22+
23+ buildFlagsArray = [
24+ "-ldflags="
25+ "-s"
26+ "-w"
27+ "-X code.cloudfoundry.org/credhub-cli/version.Version=${version}"
28+ ];
29+
30+ postInstall = ''
31+ ln -s $out/bin/credhub-cli $out/bin/credhub
32+ '';
33+
34+ preCheck = ''
35+ export HOME=$TMPDIR
36+ '';
37+
38+ meta = with stdenv.lib; {
39+ description = "Provides a command line interface to interact with CredHub servers";
40+ homepage = "https://github.com/cloudfoundry-incubator/credhub-cli";
41+ maintainers = with maintainers; [ ris ];
42+ license = licenses.asl20;
43+ };
44+}
pkgs/top-level/all-packages.nix+4
@@ -1886,6 +1886,10 @@ in
18861886
18871887 cppclean = callPackage ../development/tools/cppclean {};
18881888
1889+ credhub-cli = callPackage ../tools/admin/credhub-cli {
1890+ buildGoModule = buildGo114Module;
1891+ };
1892+
18891893 crex = callPackage ../tools/misc/crex { };
18901894
18911895 cri-tools = callPackage ../tools/virtualization/cri-tools {};