[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#42885] [PATCH 4/4] gnu: calibre: Add wrap phase for qtwebengine.
From: |
Brendan Tildesley |
Subject: |
[bug#42885] [PATCH 4/4] gnu: calibre: Add wrap phase for qtwebengine. |
Date: |
Sun, 16 Aug 2020 17:03:18 +1000 |
* gnu/packages/ebook.scm (calibre): [arguments]: Copy the wrap phase
from Anki to wrap QTWEBENGINEPROCESS_PATH. This fixes the 'Could not
find QtWebEngineProcess error' when opening a book with the
ebook-viewer.
---
gnu/packages/ebook.scm | 34 +++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index a434f56bc1..31864a0786 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -165,7 +165,10 @@
("qtwebengine" ,qtwebengine)
("sqlite" ,sqlite)))
(arguments
- `(#:python ,python-2
+ `(#:modules ((guix build python-build-system)
+ (guix build utils)
+ (ice-9 match))
+ #:python ,python-2
;; Calibre is using setuptools by itself, but the setup.py is not
;; compatible with the shim wrapper (taken from pip) we are using.
#:use-setuptools? #f
@@ -252,6 +255,35 @@
"man-pages"
(string-append (assoc-ref outputs "out") "/share/man"))
#t))
+ ;; wrap phase copied from anki package.
+ (add-after 'install 'wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
+ ;; List of paths to the site-packages directories of Python
+ ;; library inputs.
+ (site-packages
+ (map (lambda (pyinput)
+ (string-append
+ (cdr pyinput)
+ "/lib/python2.7/site-packages"))
+ (filter (match-lambda
+ ((label . _)
+ (string-prefix? "python2-" label)))
+ inputs)))
+ (qtwebengineprocess
+ (string-append (assoc-ref inputs "qtwebengine")
+ "/lib/qt5/libexec/QtWebEngineProcess")))
+ ;; The program fails to find the QtWebEngineProcess program, so
+ ;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is
+ ;; wrapped to avoid declaring Python libraries as propagated
+ ;; inputs.
+ (for-each (lambda (program)
+ (wrap-program program
+ `("QTWEBENGINEPROCESS_PATH" =
+ (,qtwebengineprocess))
+ `("PYTHONPATH" = ,site-packages)))
+ (find-files bin ".")))
+ #t))
;; The font TTF files are used in some miscellaneous tests, so we
;; unbundle them here to avoid patching the tests.
(add-after 'install 'unbundle-font-liberation
--
2.28.0
- [bug#42885] [PATCH 1/4] gnu: ebook.scm: remove duplicate module import., Brendan Tildesley, 2020/08/16
- [bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3)., Brendan Tildesley, 2020/08/16
- [bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3)., Leo Famulari, 2020/08/23
- [bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3)., Arun Isaac, 2020/08/24
- [bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3)., Brendan Tildesley, 2020/08/24
- [bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3)., Arun Isaac, 2020/08/24
- [bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3)., Brendan Tildesley, 2020/08/24
- [bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3)., Brendan Tildesley, 2020/08/24
[bug#42885] [PATCH 3/4] gnu: calibre: Update to 4.22.0., Brendan Tildesley, 2020/08/16
[bug#42885] [PATCH 4/4] gnu: calibre: Add wrap phase for qtwebengine.,
Brendan Tildesley <=
[bug#42885] [PATCH 1/4] gnu: ebook.scm: remove duplicate module import., Leo Famulari, 2020/08/23