From b65b78ff386978ea4f29ddf2c913ed0fe3d582d0 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 21 Jan 2019 10:52:10 +0100 Subject: 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. --- gnu/packages/ebook.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 285925866c..0ab482c428 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -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))) -- cgit v1.2.3