1{ lib, buildPythonPackage, fetchPypi, pillow, poppler_utils }: 2 3buildPythonPackage rec { 4 pname = "pdf2image"; 5 version = "1.16.0"; 6 7 propagatedBuildInputs = [ pillow ]; 8 9 src = fetchPypi { 10 inherit pname version; 11 sha256 = "d58ed94d978a70c73c2bb7fdf8acbaf2a7089c29ff8141be5f45433c0c4293bb"; 12 }; 13 14 postPatch = '' 15 # Only replace first match in file 16 sed -i '0,/poppler_path=None/s||poppler_path="${poppler_utils}/bin"|' pdf2image/pdf2image.py 17 ''; 18 19 meta = with lib; { 20 description = "A python module that wraps the pdftoppm utility to convert PDF to PIL Image object"; 21 homepage = "https://github.com/Belval/pdf2image"; 22 license = licenses.mit; 23 maintainers = with maintainers; [ gerschtli ]; 24 platforms = platforms.all; 25 }; 26}