anchor.diff:  { lib, stdenv
   , fetchurl, fetchFromGitHub
  -, cmake, pkgconfig, unzip, zlib, pcre, hdf5, protobuf
  +, cmake, pkgconfig, unzip, zlib, pcre, hdf5
   , config
   
   , enableJPEG      ? true, libjpeg
  
positive.code:   NIX_CFLAGS_COMPILE = lib.optional enableEXR "-I${ilmbase.dev}/include/OpenEXR";
  
    cmakeFlags = [
      "-DBUILD_PROTOBUF=OFF"
      "-DPROTOBUF_UPDATE_FILES=ON"
      "-DWITH_OPENMP=ON"
      (opencvFlag "IPP" enableIpp)
      (opencvFlag "TIFF" enableTIFF)
  
negative.code:     src = fetchFromGitHub {
        owner  = "opencv";
        repo   = "opencv_3rdparty";
        rev    = "dfe3162c237af211e98b8960018b564bc209261d";
        sha256 = "1k5xiwdi5r2y3fs5g70lpknxqi4pj32w6l311gfwng3q1cb2crif";
      } + "/ippicv";
      files = let name = platform : "ippicv_2017u3_${platform}_general_20170822.tgz"; in
        if stdenv.system == "x86_64-linux" then
        { ${name "lnx_intel64"} = "4e0352ce96473837b1d671ce87f17359"; }
        else if stdenv.system == "i686-linux" then
        { ${name "lnx_ia32"}    = "dcdb0ba4b123f240596db1840cd59a76"; }
        else if stdenv.system == "x86_64-darwin" then
        { ${name "mac_intel64"} = "c1ebb5dfa5b7f54b0c44e1917805a463"; }
        else
        throw "ICV is not available for this platform (or not yet supported by this package)";
      dst = ".cache/ippicv";
  