gnu: calibre: Fix PDF to EPUB conversion.

When trying to convert a PDF to EPUB, the following error occurs:

File "/gnu/store/kz6bgqw9z7akj11zh20wkx14cgq0s3n2-calibre-3.35.0/lib/calibre/calibre/ebooks/pdf/pdftohtml.py", line 76, in pdftohtml
    _('Could not find pdftohtml, check it is in your PATH'))

Hardcode pdftohtml binary path by patching pdftohtml.py.

* gnu/packages/ebook.scm (calibre)[arguments]: Patch pdftohtml.py in
'configure phase to set hardcode pdftohtml binary path.
This commit is contained in:
Mathieu Othacehe 2019-01-21 10:52:10 +01:00
parent 26e4203be1
commit b65b78ff38
No known key found for this signature in database
GPG Key ID: 87C4DCF063EED871

View File

@ -177,6 +177,10 @@
(pyqt (assoc-ref inputs "python2-pyqt")))
(substitute* "setup/build_environment.py"
(("sys.prefix") (string-append "'" pyqt "'")))
(substitute* "src/calibre/ebooks/pdf/pdftohtml.py"
(("PDFTOHTML = 'pdftohtml'")
(string-append "PDFTOHTML = \"" (assoc-ref inputs "poppler")
"/bin/pdftohtml\"")))
(setenv "PODOFO_INC_DIR" (string-append podofo "/include/podofo"))
(setenv "PODOFO_LIB_DIR" (string-append podofo "/lib"))
#t)))