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

cmake: Prevent it from looking for packages in / when cross-compiling for Windows. #25330

Merged
merged 1 commit into from Apr 29, 2017

Conversation

DavidEGrayson
Copy link
Contributor

@DavidEGrayson DavidEGrayson commented Apr 29, 2017

This pull request is for the staging branch because it will cause a mass rebuild.

I was using the CMake from nixpkgs in my own project (outside of nixpkgs) to cross-compile some software for Windows. That software uses the find_package command to find Qt5Widgets. CMake was finding the Qt5Widgets package on my build system in /lib/cmake and trying (unsuccessfully) to use it. Obviously, that goes against the whole point of purity in Nix. This pull request adds a patch that comments out a line that adds / to the CMAKE_SYSTEM_PREFIX_PATH. Thanks!

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 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.

when cross-compiling for Windows.
@mention-bot
Copy link

@DavidEGrayson, thanks for your PR! By analyzing the history of the files in this pull request, we identified @7c6f434c, @abbradar and @dtzWill to be potential reviewers.

@DavidEGrayson
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants