Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3156ef2dfdcc
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 390e2ea14fbe
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on May 4, 2017

  1. Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    68c6e5b View commit details
  2. Merge pull request #25219 from knedlsepp/fix-opencv3-darwin

    opencv3: Enable darwin build
    LnL7 authored May 4, 2017
    Copy the full SHA
    390e2ea View commit details
Showing with 9 additions and 5 deletions.
  1. +6 −4 pkgs/development/libraries/opencv/3.x.nix
  2. +3 −1 pkgs/top-level/all-packages.nix
10 changes: 6 additions & 4 deletions pkgs/development/libraries/opencv/3.x.nix
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
, enablePNG ? true, libpng
, enableTIFF ? true, libtiff
, enableWebP ? true, libwebp
, enableEXR ? true, openexr, ilmbase
, enableEXR ? (!stdenv.isDarwin), openexr, ilmbase
, enableJPEG2K ? true, jasper

, enableIpp ? false
@@ -16,6 +16,7 @@
, enableGStreamer ? false, gst_all_1
, enableEigen ? false, eigen
, enableCuda ? false, cudatoolkit, gcc5
, AVFoundation, Cocoa, QTKit
}:

let
@@ -115,7 +116,7 @@ stdenv.mkDerivation rec {
++ lib.optional enableEigen eigen
++ lib.optionals enableCuda [ cudatoolkit gcc5 ]
++ lib.optional enableContrib protobuf3_1
;
++ lib.optionals stdenv.isDarwin [ AVFoundation Cocoa QTKit ];

propagatedBuildInputs = lib.optional enablePython pythonPackages.numpy;

@@ -134,7 +135,8 @@ stdenv.mkDerivation rec {
(opencvFlag "CUDA" enableCuda)
(opencvFlag "CUBLAS" enableCuda)
] ++ lib.optionals enableCuda [ "-DCUDA_FAST_MATH=ON" ]
++ lib.optional enableContrib "-DBUILD_PROTOBUF=off";
++ lib.optional enableContrib "-DBUILD_PROTOBUF=off"
++ lib.optionals stdenv.isDarwin ["-DWITH_OPENCL=OFF" "-DWITH_LAPACK=OFF"];

enableParallelBuilding = true;

@@ -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;
};
}
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -9326,7 +9326,9 @@ with pkgs;
ffmpeg = ffmpeg_2;
};

opencv3 = callPackage ../development/libraries/opencv/3.x.nix { };
opencv3 = callPackage ../development/libraries/opencv/3.x.nix {
inherit (darwin.apple_sdk.frameworks) AVFoundation Cocoa QTKit;
};

# this ctl version is needed by openexr_viewers
openexr_ctl = ctl;