1{ stdenv, buildGoPackage, fetchFromGitHub, go }: 2 3buildGoPackage rec { 4 name = "cloudfoundry-cli-${version}"; 5 version = "6.32.0"; 6 7 goPackagePath = "code.cloudfoundry.org/cli"; 8 9 subPackages = [ "." ]; 10 11 src = fetchFromGitHub { 12 rev = "v${version}"; 13 owner = "cloudfoundry-attic"; 14 repo = "cli-with-i18n"; 15 sha256 = "16r8zvahn4b98krmyb8zq9370i6572dhz88bfxb3fnddcv6zy1ng"; 16 }; 17 18 outputs = [ "out" ]; 19 20 buildFlagsArray = '' 21 -ldflags= -X ${goPackagePath}/version.binaryVersion=${version} 22 ''; 23 24 installPhase = '' 25 install -Dm555 go/bin/cli "$out/bin/cf" 26 remove-references-to -t ${go} "$out/bin/cf" 27 install -Dm444 -t "$out/share/bash-completion/completions/" "$src/ci/installers/completion/cf" 28 ''; 29 30 meta = with stdenv.lib; { 31 description = "The official command line client for Cloud Foundry"; 32 homepage = https://github.com/cloudfoundry/cli; 33 maintainers = with maintainers; [ ris ]; 34 license = licenses.asl20; 35 }; 36}