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

vagrant: fix Ruby and libffi libraries on Darwin #30094

Merged
merged 1 commit into from Oct 6, 2017

Conversation

zzamboni
Copy link
Contributor

@zzamboni zzamboni commented Oct 4, 2017

On Darwin, keep the Ruby and libffi libraries and binaries bundled
with Vagrant instead of linking to the Nix ones, to avoid errors about
libraries not found.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

On Darwin, keep the Ruby and libffi libraries and binaries bundled
with Vagrant instead of linking to the Nix ones, to avoid errors about
libraries not found.
@LnL7 LnL7 added the 6.topic: darwin Running or building packages on Darwin label Oct 4, 2017
@orivej
Copy link
Contributor

orivej commented Oct 5, 2017

This patch seems to do the opposite of what you say: it moves Linux-only binary replacements into the section that applies to all platforms.

@zzamboni
Copy link
Contributor Author

zzamboni commented Oct 6, 2017

@orivej on the contrary. With the previous version, the replaced versions of Ruby and the gems are causing warnings on Darwin. With my patch, the Vagrant-bundled copies of Ruby and the gems are left alone on Darwin (this section is triggered by (! stdenv.isDarwin)), and only the other binaries and libraries are replaced with the system ones.

@orivej
Copy link
Contributor

orivej commented Oct 6, 2017

@zzamboni Oh, I misinterpreted that stdenv.lib.optionalString (! stdenv.isDarwin) existed before, rather than just introduced.

@orivej orivej merged commit ebd14ee into NixOS:master Oct 6, 2017
@zzamboni zzamboni deleted the vagrant-fix-darwin branch October 6, 2017 10:13
@zzamboni
Copy link
Contributor Author

zzamboni commented Oct 6, 2017

@orivej thanks!

@LnL7
Copy link
Member

LnL7 commented Oct 6, 2017

Is this necessary, why isn't this a problem on linux?

@zzamboni
Copy link
Contributor Author

zzamboni commented Oct 6, 2017

@LnL7 not sure, but some of the statements in the package (e.g. those linking .so files) are very Linux-specific. My question would be if it's necessary at all to replace/link those files (in any platform) instead of using the files bundled with the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants