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

opencv3: Enable darwin build #25219

Merged
merged 1 commit into from May 4, 2017
Merged

Conversation

knedlsepp
Copy link
Member

@knedlsepp knedlsepp commented Apr 25, 2017

Motivation for this change

This should make opencv3 build on darwin.

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.

@mention-bot
Copy link

@knedlsepp, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bjornfor, @abbradar and @basvandijk to be potential reviewers.

@@ -147,6 +149,6 @@ stdenv.mkDerivation rec {
homepage = http://opencv.org/;
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [viric flosse mdaiter];
platforms = with stdenv.lib.platforms; linux;
platforms = with stdenv.lib.platforms; [ linux darwin ];
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to be linux ++ darwin

Copy link
Member

Choose a reason for hiding this comment

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

actually we found out recently that having darwin as variable name above break this. So you need to do:

platforms = with stdenv.lib; platforms.linux ++ platforms.darwin;

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we also generally try to avoid passing in all of darwin and instead pass in the individual Frameworks we use. There's probably a better way to do this of course 😄

Copy link
Member

Choose a reason for hiding this comment

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

Move darwin.* to pkgs! 😈

Copy link
Member

Choose a reason for hiding this comment

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

Probably makes sense, eventually, but there are some overlaps that are awkward

Copy link
Member

Choose a reason for hiding this comment

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

I feel like we should reach a consensus on inherit vs using the darwin attributeset directly. Neither of them has a clear advantage, but I would prefer one of these to be used more prominently throughout nixpkgs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed your suggestions.

@LnL7 LnL7 added the 6.topic: darwin Running or building packages on Darwin label May 1, 2017
@LnL7 LnL7 merged commit 390e2ea into NixOS:master May 4, 2017
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

5 participants