diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index 0c6f9fb90c0c..c84740ebcdc9 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -244,9 +244,9 @@ stdenv.mkDerivation { echo '"(build info elided)"' > modules/core/version_string.inc ''; - buildInputs = - [ zlib pcre hdf5 boost gflags protobuf ] + buildInputs = [ zlib pcre boost gflags protobuf ] ++ lib.optional enablePython pythonPackages.python + ++ lib.optional (stdenv.buildPlatform == stdenv.hostPlatform) hdf5 ++ lib.optional enableGtk2 gtk2 ++ lib.optional enableGtk3 gtk3 ++ lib.optional enableVtk vtk