anchor.diff:  { lib
   , stdenv
   , fetchurl
  -, fetchpatch
   , fetchFromGitHub
   , cmake
   , pkg-config
  
positive.code: }:
  
  let
    version = "4.5.2";
  
    src = fetchFromGitHub {
      owner = "opencv";
      repo = "opencv";
      rev = version;
      sha256 = "sha256-pxi1VBF4txvRqspdqvCsAQ3XKzl633/o3wyOgD9wid4=";
    };
  
    contribSrc = fetchFromGitHub {
      owner = "opencv";
      repo = "opencv_contrib";
      rev = version;
      sha256 = "sha256-iMenRTY+qeL7WRgnRuQbsHflYDakE7pWWSHeIjrg0Iw=";
    };
  
    # Contrib must be built in order to enable Tesseract support:
  
negative.code:   # Ensures that we use the system OpenEXR rather than the vendored copy of the source included with OpenCV.
    patches = [
      ./cmake-don-t-use-OpenCVFindOpenEXR.patch
    ] ++ lib.optional enableCuda ./cuda_opt_flow.patch;
  
    # This prevents cmake from using libraries in impure paths (which
  