anchor.diff:  { lib, stdenv
  -, fetchurl, fetchFromGitHub, fetchpatch
  +, fetchurl, fetchFromGitHub
   , cmake, pkgconfig, unzip, zlib, pcre, hdf5
   , glog, boost, google-gflags, protobuf
   , config
  
positive.code:   contribSrc = fetchFromGitHub {
      owner  = "opencv";
      repo   = "opencv_contrib";
      # TODO: set to `version` when opencv_contrib-4.0.1 is released;
      # See: http://answers.opencv.org/question/205793/will-there-be-a-opencv_contrib-401-release-now-that-opencv-401-is-out/
      rev    = "4.0.0";
      sha256 = "1g4pzw7hv1v9jp1nrqjxqwpi1byl3mxkj6w6ibq6ydsn0138p66z";
    };
  
    # Contrib must be built in order to enable Tesseract support:
  
negative.code:   postUnpack = lib.optionalString buildContrib ''
      cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib"
    '';
  
    # This prevents cmake from using libraries in impure paths (which
    # causes build failure on non NixOS)
  