anchor.diff:      "--enable-largefile"
     ];
   
  -  preConfigure =
  -    /* Patch include directory where configure looks for leptonica's headers */ ''
  -      substituteInPlace configure \
  -        --replace 'LIBLEPT_HEADERSDIR="/usr/local/include /usr/include"' \
  -                  'LIBLEPT_HEADERSDIR=${leptonica}/include'
  -    '';
  -
  -  postInstall =
  -    /* Symlink all installed tessdata files into tesseract */ ''
  -      for i in ${tessdata}/* ; do
  -        ln -fsv $i $out/share/tessdata
  -      done
  -    '';
  +  /* Fix leptonica header search path */
  +  LIBLEPT_HEADERSDIR = "${leptonica}/include";
  +
  +  postInstall = /* Symlink all installed tessdata files into tesseract */ ''
  +    for i in ${tessdata}/* ; do
  +      ln -fsv $i $out/share/tessdata
  +    done
  +  '';
   
     meta = with stdenv.lib; {
       description = "OCR engine";
  
positive.code:       owner = "tesseract-ocr";
        repo = "tessdata";
        rev = "3cf1e2df1fe1d1da29295c9ef0983796c7958b7d";
        sha256 = "53eee3ad9e64db9bc88830f5cb3905b273bf84d78579497c55c5dd441a15fdda";
      };
  
      phases = [ "unpackPhase" "installPhase" ];
  
negative.code: 
    src = fetchzip {
      url = "https://github.com/tesseract-ocr/tesseract/archive/${version}.tar.gz";
      sha256 = "c333c95030740d52cc8ae69b2c7db773ab0fb430d844a6bbea6a52fb130a2381";
    };
  
    nativeBuildInputs = [
  