anchor.diff:  , enableFfmpeg    ? false, ffmpeg
   , enableGStreamer ? false, gst_all_1
   , enableEigen     ? false, eigen
  +, enableOpenblas  ? false, openblas
   , enableCuda      ? false, cudatoolkit, gcc5
   , AVFoundation, Cocoa, QTKit
   }:
  
positive.code:     ++ lib.optional enableFfmpeg ffmpeg
      ++ lib.optionals enableGStreamer (with gst_all_1; [ gstreamer gst-plugins-base ])
      ++ lib.optional enableEigen eigen
      ++ lib.optionals enableCuda [ cudatoolkit gcc5 ]
      ++ lib.optional enableContrib protobuf3_1
      ++ lib.optionals stdenv.isDarwin [ AVFoundation Cocoa QTKit ];
  
negative.code:   NIX_CFLAGS_COMPILE = lib.optional enableEXR "-I${ilmbase.dev}/include/OpenEXR";
  
    cmakeFlags = [
      "-DWITH_IPP=${if enableIpp then "ON" else "OFF"} -DWITH_OPENMP=ON"
      (opencvFlag "TIFF" enableTIFF)
      (opencvFlag "JASPER" enableJPEG2K)
      (opencvFlag "WEBP" enableWebP)
  