Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudfoundry-cli: fix build on multiple platforms, notably darwin. also bump -> 6.41.0 #52519

Merged
merged 3 commits into from Dec 21, 2018

Conversation

risicle
Copy link
Contributor

@risicle risicle commented Dec 19, 2018

Motivation for this change

The cloudfoundry-cli package would previously build the linux/amd64 binary on all platforms. This was due to the projects makefiles having specific targets for different platforms.

I'm fairly certain this will also work on most platforms, it's just there isn't a specific makefile target for them and would require us to do some manual tinkering.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@risicle risicle changed the title cloudfoundry-cli: fix build on multiple platforms, notably darwin, to produce correct binary for target cloudfoundry-cli: fix build on multiple platforms, notably darwin. also bump -> 6.41.0 Dec 19, 2018
@risicle
Copy link
Contributor Author

risicle commented Dec 19, 2018

Note I've also pushed on top of this a bump from 6.37.0 to 6.41.0, but I want to keep them as separate commits so I can easily & clearly cherry-pick the build fix to stable.

@risicle
Copy link
Contributor Author

risicle commented Dec 20, 2018

I realize I've inadvertently tried to reinvent the meta.platforms = mechanism here using the disabled = attribute - am pushing a better version...

@Mic92
Copy link
Member

Mic92 commented Dec 20, 2018

Can you make the package install to $bin and remove remove-references-to?
buildGoPackage will then take care of removing go compiler references.

@risicle
Copy link
Contributor Author

risicle commented Dec 20, 2018

Think I've done what you want, but I'll note that I wasn't the one that added these things originally, despite what git annotate might tell you. I think I will be unticking "allow edits from maintainers" in future as it is so confusing.

Again, I'd appreciate it if you didn't squash these commits as I'll be looking to cherry pick the most straightforward platform-fixing commit for stable.

@Mic92 Mic92 merged commit 3d6e86f into NixOS:master Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants