(address . guix-patches@gnu.org)
Esteemed maintainers,
Currently, Calibre can't open .epub files unless `qtwebengine` package is
also available in one's $GUIX_PROFILE. Neither can the stand-alone
`ebook-viewer` program supplied with Calibre. It exits with the complaint:
"Could not find QtWebEngineProcess".
Attached is a patch to fix the issue. QtWebEngineProcess is now made
available to all Calibre binaries via QTWEBENGINE_PATH set during a new
'wrap-program phase introduced with the patch.
Thank you
From cec0d8adf456eff2201fd89bb1fde6cba9d6fa77 Mon Sep 17 00:00:00 2001
From: Prafulla Giri <pratheblackdiamond@gmail.com>
Date: Sun, 6 Sep 2020 23:57:14 +0545
Subject: [PATCH] gnu: calibre: make QtWebEngineProcess available during
runtime
* gnu/packages/ebook.scm [arguments]: Add new phase 'wrap-program
to make QtWebEngineProcess available to the binaries during run-
time with QTWEBENGINEPROCESS_PATH.
---
gnu/packages/ebook.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
Toggle diff (29 lines)
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index aab4155d3d..f63d284afb 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -262,6 +262,22 @@
"/share/fonts/truetype")))
(delete-file-recursively font-dest)
(symlink font-src font-dest))
+ #t))
+ ;; Make run-time dependencies available to the binaries
+ (add-after 'wrap 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (qtwebengine (assoc-ref inputs "qtwebengine")))
+ (with-directory-excursion (string-append out "/bin")
+ (for-each
+ (lambda (binary)
+ (wrap-program binary
+ ;; Make QtWebEngineProcess available
+ `("QTWEBENGINEPROCESS_PATH" ":" =
+ ,(list (string-append
+ qtwebengine
+ "/lib/qt5/libexec/QtWebEngineProcess")))))
+ (find-files "." "."))))
#t)))))
(home-page "https://calibre-ebook.com/")
(synopsis "E-book library management software")
--
2.28.0