guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.


From: guix-commits
Subject: branch master updated: gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
Date: Tue, 08 Sep 2020 16:02:29 -0400

This is an automated email from the git hooks/post-receive script.

andreas pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new fd3eac4  gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
fd3eac4 is described below

commit fd3eac4dd774597d493e6d8aae7b1c2653070bc7
Author: Brendan Tildesley <mail@brendan.scot>
AuthorDate: Mon Sep 7 01:05:37 2020 +1000

    gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
    
    * gnu/packages/ebook.scm (calibre): Wrap QTWEBENGINEPROCESS_PATH in
    addition to wrapping PYTHONPATH as python-build-system does.
    
    Signed-off-by: Andreas Enge <andreas@enge.fr>
---
 gnu/packages/ebook.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index aab4155..b7c78b6 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -246,6 +246,29 @@
                                           (assoc-ref inputs "js-mathjax")
                                           "/share/javascript/mathjax"))
              (invoke "python2" "setup.py" "rapydscript")))
+         (replace 'wrap
+           ;; Here we wrap PYTHONPATH exactly as it would be in
+           ;; python-build-system, plus the addition of
+           ;; QTWEBENGINEPROCESS_PATH, fixing a bug where Calibre would not
+           ;; find Qtwebengine.
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (python (assoc-ref inputs "python"))
+                    (site-packages
+                     (cons (string-append out "/lib/python"
+                                          (python-version python)
+                                          "/site-packages")
+                           (search-path-as-string->list (getenv 
"PYTHONPATH"))))
+                    (qtwebengineprocess
+                     (string-append (assoc-ref inputs "qtwebengine")
+                                    "/lib/qt5/libexec/QtWebEngineProcess")))
+               (for-each (lambda (program)
+                           (wrap-program program
+                                 `("QTWEBENGINEPROCESS_PATH" = 
(,qtwebengineprocess))
+                                 `("PYTHONPATH" prefix ,site-packages)))
+                         (find-files bin ".")))
+             #t))
          (add-after 'install 'install-man-pages
            (lambda* (#:key outputs #:allow-other-keys)
              (copy-recursively



reply via email to

[Prev in Thread] Current Thread [Next in Thread]