anchor.diff:  }:
   
   let
  -  version = "4.0.0";
  +  version = "4.0.1";
   
     src = fetchFromGitHub {
       owner  = "opencv";
       repo   = "opencv";
       rev    = version;
  -    sha256 = "1r2hszm4044dfx65wv69rcs419jjd7bqllhnpcwk3n28f5ahln50";
  +    sha256 = "1f0n2a57sn47w55vaxlwhr3g6xgchvr3gxicxbkyzai3pvj55k48";
     };
   
     contribSrc = fetchFromGitHub {
       owner  = "opencv";
       repo   = "opencv_contrib";
  -    rev    = version;
  +    # 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";
     };
   
  
positive.code:     cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib"
    '';
  
    patches = [
      # https://github.com/opencv/opencv/pull/13232
      # This also fixes the test of haskell-opencv HEAD where we got the following error:
      # libgomp: Out of memory allocating 927712937064 bytes
      (fetchpatch {
        url = https://github.com/opencv/opencv/commit/e1ac8589f8a19b9bf5598bbae073ae12721c541d.patch;
        sha256 = "1ap2818lixjhc5jgf779c57kwacafc0ap40lqrx6nqfz31silglj";
      })
    ] ++
      # Fixes issue: https://github.com/opencv/opencv_contrib/issues/1923
      # PR: https://github.com/opencv/opencv_contrib/pull/1913
      lib.optional buildContrib (fetchpatch {
  
negative.code:       sha256 = "102mq1qgmla40hhj8mda70inhakdazm9agyah98kq9931scvf0c9";
        stripLen = 2;
        extraPrefix = "opencv_contrib/";
      });
  
    # This prevents cmake from using libraries in impure paths (which
  