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

opencv: enable videoio on darwin #97633

Merged
merged 1 commit into from Sep 16, 2020

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Sep 10, 2020

Motivation for this change

Fixes #97575
cc: @jeff-hykin @mjlbach

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Sep 10, 2020
@ofborg ofborg bot requested review from mdaiter and basvandijk September 10, 2020 05:59
@mjlbach
Copy link
Contributor

mjlbach commented Sep 11, 2020

@jeff-hykin Can you test? I don't use this functionality. Otherwise LGTM.

@jeff-hykin
Copy link

jeff-hykin commented Sep 11, 2020

Yeah, I'm happy too. I might need to wait till next week since I'm got deadlines atm.

Something that might slow it down a bit more is, I'm not sure how point nix towards a specific branch/commit. So advice on that would be appreciated, but I can probably figure it out with the docs if needed. I have to learn it anyways for a separate nix issue.

Edit: Ah looks like you already mentioned how in the issue post
nix-shell -I nixpkgs=/path/to/local/nixpkgs -p opencv4

@jeff-hykin
Copy link

jeff-hykin commented Sep 11, 2020

I'll need python to test with it. e.g. nix-shell -I nixpkgs=./nixpkgs -p opencv4 isn't enough for me to test. Copying from my shell.nix, I tried nix-shell -I nixpkgs=./nixpkgs -p python37.opencv4 but that failed so I'm going to have to spend more time on it another day.

nix-shell -I nixpkgs=./nixpkgs -p opencv4 did compile opencv for me on Sierra without errors though

Note: my system also might not be the most representative since I've got opencv installed in many forms already. I'll use --pure to help limit the external interaction though

@mjlbach
Copy link
Contributor

mjlbach commented Sep 12, 2020

@jeff-hykin There are a lot of ways to test this PR. You might want to look into nixpkgs-review

cd to your local checkout of nixpkgs, and run the following command to test:

nixpkgs-review pr --checkout commit  97633 -p opencv4 -p python3Packages.opencv4

You can also just run the following to get a nix-shell with the package available:

nix-shell -I nixpkgs=https://github.com/marsam/nixpkgs/archive/1966a0a4e1c1e07991406e3b90e3b088df252aea.tar.gz -p opencv4 python3Packages.opencv4

@marsam
Copy link
Contributor Author

marsam commented Sep 16, 2020

I'm merging this as-is, but feel free to open an issue if you find an issue

@marsam marsam merged commit 7dbc323 into NixOS:master Sep 16, 2020
@marsam marsam deleted the enable-opencv-videoio-darwin branch September 16, 2020 03:57
@jeff-hykin
Copy link

jeff-hykin commented Sep 19, 2020

You can also just run the following to get a nix-shell with the package available:

nix-shell -I nixpkgs=https://github.com/marsam/nixpkgs/archive/1966a0a4e1c1e07991406e3b90e3b088df252aea.tar.gz -p opencv4 python3Packages.opencv4

That is awesome! Thanks @mjlbach

Using that I tested the change just now, and can confirm it works 👍

thanks @marsam for merging this in

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.

OpenCV videoio Darwin/Mac issue/discussion
3 participants