summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-12-19 12:23:41 +0200
committerEfraim Flashner <efraim@flashner.co.il>2021-12-19 12:23:41 +0200
commit9f916d14765b00309c742fcbff0cfabdd10dcf05 (patch)
tree4b018118f99ff63ac3dbac949d80b5a25871db57
parentde86aaa0971534f2c9082e5c0efd5e251c900a41 (diff)
downloadguix-9f916d14765b00309c742fcbff0cfabdd10dcf05.tar.gz
gnu: qutebrowser: Install userscripts.
* gnu/packages/web-browsers.scm (qutebrowsers)[inputs]: Add
python-pynacs.
[arguments]: Add custom 'patch-systemdir, 'install-userscripts phases.
-rw-r--r--gnu/packages/web-browsers.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm
index 6a52443100..6807cb1be3 100644
--- a/gnu/packages/web-browsers.scm
+++ b/gnu/packages/web-browsers.scm
@@ -87,6 +87,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
@@ -481,6 +482,7 @@ interface.")
            python-jinja2
            python-markupsafe
            python-pygments
+           python-pynacl
            python-pypeg2
            python-pyyaml
            ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so
@@ -497,6 +499,11 @@ interface.")
        #:tests? #f
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'patch-systemdir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (substitute* "qutebrowser/utils/standarddir.py"
+                 (("/usr/share") (string-append out "/share"))))))
          (add-before 'check 'set-env-offscreen
            (lambda _
              (setenv "QT_QPA_PLATFORM" "offscreen")))
@@ -521,6 +528,12 @@ interface.")
                  (("Exec=qutebrowser")
                   (string-append "Exec=" out "/bin/qutebrowser")))
                (install-file "misc/org.qutebrowser.qutebrowser.desktop" app))))
+         (add-after 'install 'install-userscripts
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out     (assoc-ref outputs "out"))
+                    (scripts (string-append out "/share/qutebrowser/userscripts")))
+               (mkdir-p scripts)
+               (copy-recursively "misc/userscripts" scripts))))
          (add-after 'wrap 'wrap-qt-process-path
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))