Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildGoModule, fetchFromGitHub, fetchpatch }: 2 3buildGoModule rec { 4 pname = "credhub-cli"; 5 version = "2.9.16"; 6 7 src = fetchFromGitHub { 8 owner = "cloudfoundry-incubator"; 9 repo = "credhub-cli"; 10 rev = version; 11 sha256 = "sha256-NfGS5kUfmv1djYMqB1HrNFgM2cBfW4EZHrkxhwmBWKQ="; 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 vendorHash = null; 22 23 ldflags = [ 24 "-s" 25 "-w" 26 "-X code.cloudfoundry.org/credhub-cli/version.Version=${version}" 27 ]; 28 29 postInstall = '' 30 ln -s $out/bin/credhub-cli $out/bin/credhub 31 ''; 32 33 preCheck = '' 34 export HOME=$TMPDIR 35 ''; 36 37 meta = with lib; { 38 description = "Provides a command line interface to interact with CredHub servers"; 39 homepage = "https://github.com/cloudfoundry-incubator/credhub-cli"; 40 maintainers = with maintainers; [ ris ]; 41 license = licenses.asl20; 42 }; 43}