Unverified Commit f811a92b authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #256550 from bcdarwin/opencv-updates

{caffe,mxnet,sdrangel,video2midi,waifu2x-converter-cpp}: opencv3 -> opencv4
parents 0ff30cd3 381e03e0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
, libbladeRF
, mbelib
, ninja
, opencv3
, opencv4
, pkg-config
, qtcharts
, qtdeclarative
@@ -90,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: {
    libusb1
    limesuite
    mbelib
    opencv3
    opencv4
    qtcharts
    qtdeclarative
    qtgamepad
+9 −3
Original line number Diff line number Diff line
{ config, stdenv, lib
, fetchFromGitHub
, fetchurl
, fetchpatch
, cmake
, boost
, gflags
, glog
, hdf5-cpp
, opencv3
, opencv4
, protobuf
, doxygen
, blas
@@ -71,7 +72,7 @@ stdenv.mkDerivation rec {
      ++ ["-DUSE_LEVELDB=${toggle leveldbSupport}"]
      ++ ["-DUSE_LMDB=${toggle lmdbSupport}"];

  buildInputs = [ boost gflags glog protobuf hdf5-cpp opencv3 blas ]
  buildInputs = [ boost gflags glog protobuf hdf5-cpp opencv4 blas ]
                ++ lib.optional cudaSupport cudatoolkit
                ++ lib.optional cudnnSupport cudnn
                ++ lib.optional lmdbSupport lmdb
@@ -96,6 +97,11 @@ stdenv.mkDerivation rec {

  patches = [
    ./darwin.patch
    (fetchpatch {
       name = "support-opencv4";
       url = "https://github.com/BVLC/caffe/pull/6638/commits/0a04cc2ccd37ba36843c18fea2d5cbae6e7dd2b5.patch";
       hash = "sha256-ZegTvp0tTHlopQv+UzHDigs6XLkP2VfqLCWXl6aKJSI=";
     })
  ] ++ lib.optional pythonSupport (substituteAll {
    src = ./python.patch;
    inherit (python.sourceVersion) major minor;  # Should be changed in case of PyPy
@@ -148,7 +154,7 @@ stdenv.mkDerivation rec {
    '';
    homepage = "http://caffe.berkeleyvision.org/";
    maintainers = with maintainers; [ ];
    broken = pythonSupport && (python.isPy310);
    broken = (pythonSupport && (python.isPy310)) || cudaSupport;
    license = licenses.bsd2;
    platforms = platforms.linux ++ platforms.darwin;
  };
+2 −2
Original line number Diff line number Diff line
{ config, stdenv, lib, fetchurl, fetchpatch, bash, cmake
, opencv3, gtest, blas, gomp, llvmPackages, perl
, opencv4, gtest, blas, gomp, llvmPackages, perl
, cudaSupport ? config.cudaSupport, cudaPackages ? { }, nvidia_x11
, cudnnSupport ? cudaSupport
}:
@@ -37,7 +37,7 @@ stdenv.mkDerivation rec {

  nativeBuildInputs = [ cmake perl ];

  buildInputs = [ opencv3 gtest blas.provider ]
  buildInputs = [ opencv4 gtest blas.provider ]
    ++ lib.optional stdenv.cc.isGNU gomp
    ++ lib.optional stdenv.cc.isClang llvmPackages.openmp
    # FIXME: when cuda build is fixed, remove nvidia_x11, and use /run/opengl-driver/lib
+3 −3
Original line number Diff line number Diff line
{ lib, fetchFromGitHub, pythonPackages, opencv3 }:
{ lib, fetchFromGitHub, pythonPackages, opencv4 }:

let
  opencv3_ = pythonPackages.toPythonModule (opencv3.override {
  opencv4_ = pythonPackages.toPythonModule (opencv4.override {
    inherit pythonPackages;
    enablePython = true;
    enableFfmpeg = true;
@@ -19,7 +19,7 @@ in pythonPackages.buildPythonApplication rec {
    sha256 = "0qzrxqhsxn0h71nfrsi9g78hx3pqm3b8sr6fjq01k4k6dd2nwfam";
  };

  propagatedBuildInputs = with pythonPackages; [ opencv3_ midiutil pygame pyopengl ];
  propagatedBuildInputs = with pythonPackages; [ opencv4_ midiutil pygame pyopengl ];

  installPhase = ''
    install -Dm755 v2m.py $out/bin/v2m.py
+0 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
, libtiff
, ninja
, nix-update
, opencv3
, openexr
, pkg-config
, qtbase
@@ -78,7 +77,6 @@ stdenv.mkDerivation (finalAttrs: {
    libjpeg
    libtiff
    libpng
    opencv3
    openexr
    graphicsmagick
    curl
Loading