diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-12-21 13:28:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-21 13:28:45 +0100 |
commit | 3d6e86f77e25703fd5cf40fc5f1ae68555df735d (patch) | |
tree | a91cb3ac1a230cc61f9a7d6e65968f91f0d0778c /pkgs/development | |
parent | 02ce974d04a8b00ad8d002a513ebf99fb4e187bd (diff) | |
parent | 9046038d6cded077ed3553f0c008a9939b78bcb4 (diff) | |
download | nixlib-3d6e86f77e25703fd5cf40fc5f1ae68555df735d.tar nixlib-3d6e86f77e25703fd5cf40fc5f1ae68555df735d.tar.gz nixlib-3d6e86f77e25703fd5cf40fc5f1ae68555df735d.tar.bz2 nixlib-3d6e86f77e25703fd5cf40fc5f1ae68555df735d.tar.lz nixlib-3d6e86f77e25703fd5cf40fc5f1ae68555df735d.tar.xz nixlib-3d6e86f77e25703fd5cf40fc5f1ae68555df735d.tar.zst nixlib-3d6e86f77e25703fd5cf40fc5f1ae68555df735d.zip |
Merge pull request #52519 from risicle/ris-cf-cli-platforms
cloudfoundry-cli: fix build on multiple platforms, notably darwin. also bump -> 6.41.0
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/cloudfoundry-cli/default.nix | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/pkgs/development/tools/cloudfoundry-cli/default.nix b/pkgs/development/tools/cloudfoundry-cli/default.nix index 3ce9e64c0f7a..4f285fa69618 100644 --- a/pkgs/development/tools/cloudfoundry-cli/default.nix +++ b/pkgs/development/tools/cloudfoundry-cli/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { name = "cloudfoundry-cli-${version}"; - version = "6.37.0"; + version = "6.41.0"; goPackagePath = "code.cloudfoundry.org/cli"; @@ -12,20 +12,28 @@ buildGoPackage rec { owner = "cloudfoundry"; repo = "cli"; rev = "v${version}"; - sha256 = "1v4f1fyydpzkfir46g4ppbf3zmk3ym6kxswpkdjls8h3dbb2fbnv"; + sha256 = "1dkd0lfq55qpnxsrigffaqm2nlcxr0bm0jsl4rsjlmb8p2vgpx8b"; }; - outputs = [ "out" ]; + makeTarget = let hps = stdenv.hostPlatform.system; in + if hps == "x86_64-darwin" then + "out/cf-cli_osx" + else if hps == "x86_64-linux" then + "out/cf-cli_linux_x86-64" + else if hps == "i686-linux" then + "out/cf-cli_linux_i686" + else + throw "make target for this platform unknown"; buildPhase = '' cd go/src/${goPackagePath} - CF_BUILD_DATE="1970-01-01" make build + CF_BUILD_DATE="1970-01-01" make $makeTarget + cp $makeTarget out/cf ''; installPhase = '' - install -Dm555 out/cf "$out/bin/cf" - remove-references-to -t ${go} "$out/bin/cf" - install -Dm444 -t "$out/share/bash-completion/completions/" "$src/ci/installers/completion/cf" + install -Dm555 out/cf "$bin/bin/cf" + install -Dm444 -t "$bin/share/bash-completion/completions/" "$src/ci/installers/completion/cf" ''; meta = with stdenv.lib; { @@ -33,5 +41,6 @@ buildGoPackage rec { homepage = https://github.com/cloudfoundry/cli; maintainers = with maintainers; [ ris ]; license = licenses.asl20; + platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; }; } |