anchor.diff:      # simply enabled automatically if contrib is built, and it detects
       # tesseract & leptonica.
       ++ lib.optionals enableTesseract [ tesseract leptonica ]
  +    ++ lib.optional enableTbb tbb
       ++ lib.optional enableCuda cudatoolkit
       ++ lib.optionals stdenv.isDarwin [ AVFoundation Cocoa QTKit VideoDecodeAcceleration bzip2 ]
       ++ lib.optionals enableDocs [ doxygen graphviz-nox ];
  
positive.code:     (opencvFlag "OPENEXR" enableEXR)
      (opencvFlag "CUDA" enableCuda)
      (opencvFlag "CUBLAS" enableCuda)
    ] ++ lib.optionals enableCuda [
      "-DCUDA_FAST_MATH=ON"
      "-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
  
negative.code: , enableFfmpeg    ? false, ffmpeg
  , enableGStreamer ? false, gst_all_1
  , enableTesseract ? false, tesseract, leptonica
  , enableTbb       ? false, tbb
  , enableOvis      ? false, ogre
  , enableGPhoto2   ? false, libgphoto2
  , enableDC1394    ? false, libdc1394
  