nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 41 lines 836 B view raw
1{ buildPythonPackage, fetchFromGitHub, lib, packaging, pillow, tesseract, substituteAll 2, pytestCheckHook 3}: 4 5buildPythonPackage rec { 6 pname = "pytesseract"; 7 version = "0.3.10"; 8 format = "pyproject"; 9 10 src = fetchFromGitHub { 11 owner = "madmaze"; 12 repo = pname; 13 rev = "v${version}"; 14 sha256 = "sha256-CyKXtaIE/8iPLqi0GHVUgTeJDYZyWBjkRvOKJJKCxZo="; 15 }; 16 17 patches = [ 18 (substituteAll { 19 src = ./tesseract-binary.patch; 20 drv = tesseract; 21 }) 22 ]; 23 24 buildInputs = [ 25 tesseract 26 ]; 27 28 propagatedBuildInputs = [ 29 packaging 30 pillow 31 ]; 32 33 checkInputs = [ pytestCheckHook ]; 34 35 meta = with lib; { 36 homepage = "https://pypi.org/project/pytesseract/"; 37 license = licenses.asl20; 38 description = "A Python wrapper for Google Tesseract"; 39 maintainers = with maintainers; [ ma27 ]; 40 }; 41}