anchor.diff:      "-DBUILD_PROTOBUF=OFF"
       "-DPROTOBUF_UPDATE_FILES=ON"
       "-DOPENCV_ENABLE_NONFREE=${printEnabled enableUnfree}"
  +    "-DBUILD_TESTS=OFF"
  +    "-DBUILD_PERF_TESTS=OFF"
       (opencvFlag "IPP" enableIpp)
       (opencvFlag "TIFF" enableTIFF)
       (opencvFlag "JASPER" enableJPEG2K)
  
positive.code: { lib, stdenv
  , fetchurl, fetchFromGitHub, fetchpatch
  , cmake, pkgconfig, unzip, zlib, pcre, hdf5
  , caffe, glog, boost, google-gflags, protobuf
  , config
  
  , enableJPEG      ? true, libjpeg
  
negative.code: 
    buildInputs =
         [ zlib pcre hdf5 glog boost google-gflags protobuf ]
      ++ lib.optional enablePython pythonPackages.python
      ++ lib.optional enableGtk2 gtk2
      ++ lib.optional enableGtk3 gtk3
  