Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 02ce974d04a8
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3d6e86f77e25
Choose a head ref
  • 4 commits
  • 1 file changed
  • 3 contributors

Commits on Dec 21, 2018

  1. cloudfoundry-cli: fix build on multiple platforms, notably darwin, to…

    … produce correct binary for target
    risicle committed Dec 21, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    vcunat Vladimír Čunát
    Copy the full SHA
    61fad2c View commit details
  2. Copy the full SHA
    8e5c4a4 View commit details
  3. Copy the full SHA
    9046038 View commit details
  4. Merge pull request #52519 from risicle/ris-cf-cli-platforms

    cloudfoundry-cli: fix build on multiple platforms, notably darwin. also bump -> 6.41.0
    Mic92 authored Dec 21, 2018
    Copy the full SHA
    3d6e86f View commit details
Showing with 16 additions and 7 deletions.
  1. +16 −7 pkgs/development/tools/cloudfoundry-cli/default.nix
23 changes: 16 additions & 7 deletions pkgs/development/tools/cloudfoundry-cli/default.nix
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

buildGoPackage rec {
name = "cloudfoundry-cli-${version}";
version = "6.37.0";
version = "6.41.0";

goPackagePath = "code.cloudfoundry.org/cli";

@@ -12,26 +12,35 @@ 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; {
description = "The official command line client for Cloud Foundry";
homepage = https://github.com/cloudfoundry/cli;
maintainers = with maintainers; [ ris ];
license = licenses.asl20;
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
};
}