Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ buildPythonPackage, fetchPypi, lib, pillow, tesseract, substituteAll }: 2 3buildPythonPackage rec { 4 pname = "pytesseract"; 5 version = "0.2.6"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "0w4phjw0gn52hqlm3ixs2cmj25x7y7nk6ijr9f82wvjvb4hh7hhi"; 10 }; 11 12 patches = [ 13 (substituteAll { 14 src = ./tesseract-binary.patch; 15 drv = "${tesseract}"; 16 }) 17 ]; 18 19 buildInputs = [ tesseract ]; 20 propagatedBuildInputs = [ pillow ]; 21 22 # the package doesn't have any tests. 23 doCheck = false; 24 25 meta = with lib; { 26 homepage = https://pypi.org/project/pytesseract/; 27 license = licenses.gpl3; 28 description = "A Python wrapper for Google Tesseract"; 29 maintainers = with maintainers; [ ma27 ]; 30 }; 31}