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

rPackages: fix binutils path on Darwin #40360

Merged
merged 1 commit into from May 12, 2018

Conversation

mnacamura
Copy link
Contributor

@mnacamura mnacamura commented May 11, 2018

Motivation for this change

Recent nixpkgs seems to have changed the package in which otool and install_name_tool are living.

Things done

Changed the relevant package paths.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

@LnL7
Copy link
Member

LnL7 commented May 11, 2018

@Ericson2314 is this intensional?

If so what's the difference between binutils, darwin.binutils and darwin.cctools?

@Ericson2314
Copy link
Member

binutils is GNU binutils, darwin.cctools is Apple's linker, darwin.binutils is a mashup of the two so linking is correct but other GNU binutils are also present.

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just make them all darwin.binutils, because that was how it evaluated before. But the bottom two substitutions are fine.

@mnacamura
Copy link
Contributor Author

@Ericson2314 Thank you for clarification!

@matthewbauer
Copy link
Member

Are the subs necessary in the first place? install_name_tool is aleeady in stdenv.

@mnacamura
Copy link
Contributor Author

They are required. See #34766

@matthewbauer
Copy link
Member

Ok: we are probably missing which in that.

This works for me at least:

nix-shell --pure -p which  '<nixpkgs>' --run 'which otool'
nix-shell --pure -p which  '<nixpkgs>' --run 'which install_name_tool'

@mnacamura
Copy link
Contributor Author

Right. Adding which to the test in #34766 works. My bad.
However, this does not solve another problem in which which otool calls /usr/bin/otool in a user environment. I think we have two options: to add the subs or to use propagatedUserEnvPkgs, maybe?

@matthewbauer
Copy link
Member

Oh sorry! I didn't realize this was needed in the user environment. Either this or wrapping the runtime is probably the best route.

@matthewbauer matthewbauer merged commit d7c9dc2 into NixOS:master May 12, 2018
@mnacamura mnacamura deleted the r-darwin-cctools branch May 12, 2018 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants