From a8f402370555c8437e1e239292fb00a64f9a07d5 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 26 May 2022 16:30:28 +0300 Subject: gnu: qutebrowser: Update to 2.5.1. * gnu/packages/web-browsers.scm (qutebrowser): Update to 2.5.1. [inputs]: Remove python-cssutils and python-pypeg2. --- gnu/packages/web-browsers.scm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gnu/packages/web-browsers.scm') diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 198d289ef3..31504fe2af 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -466,7 +466,7 @@ interface.") (define-public qutebrowser (package (name "qutebrowser") - (version "2.4.0") + (version "2.5.1") (source (origin (method url-fetch) @@ -474,18 +474,16 @@ interface.") "qutebrowser/releases/download/v" version "/" "qutebrowser-" version ".tar.gz")) (sha256 - (base32 "1v4jhlmgfm8v9sbf7i3xg1vjh6dy8y2gpckk0mizkazb2jxrmkgj")))) + (base32 "1g7dfrnjgifvbmz1523iq9qxhrsciajr8dv3pak6dlacm235i276")))) (build-system python-build-system) (native-inputs (list python-attrs)) ; for tests (inputs (list bash-minimal python-colorama - python-cssutils python-jinja2 python-markupsafe python-pygments - python-pypeg2 python-pyyaml ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so ;; that it's __init__.py is used first. -- cgit 1.4.1 From 7fb0207aa22330b80294bb5d49fb6907458ce5a0 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 26 May 2022 16:42:30 +0300 Subject: gnu: qutebrowser: Install more scripts. * gnu/packages/web-browsers.scm (qutebrowser)[arguments]: Rewrite cutsom 'install-more phase to use included makefile. --- gnu/packages/web-browsers.scm | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'gnu/packages/web-browsers.scm') diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 31504fe2af..b12582dfed 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -504,25 +504,12 @@ interface.") (setenv "QT_QPA_PLATFORM" "offscreen"))) (add-after 'install 'install-more (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (app (string-append out "/share/applications")) - (hicolor (string-append out "/share/icons/hicolor"))) - (install-file "doc/qutebrowser.1" - (string-append out "/share/man/man1")) - (for-each - (lambda (i) - (let ((src (format #f "icons/qutebrowser-~dx~d.png" i i)) - (dest (format #f "~a/~dx~d/apps/qutebrowser.png" - hicolor i i))) - (mkdir-p (dirname dest)) - (copy-file src dest))) - '(16 24 32 48 64 128 256 512)) - (install-file "icons/qutebrowser.svg" - (string-append hicolor "/scalable/apps")) - (substitute* "misc/org.qutebrowser.qutebrowser.desktop" - (("Exec=qutebrowser") - (string-append "Exec=" out "/bin/qutebrowser"))) - (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)))) + (let ((out (assoc-ref outputs "out"))) + (rename-file "misc/Makefile" "Makefile") + (substitute* "Makefile" + ((".*setup\\.py.*") "")) + (invoke "make" "install" (string-append "PREFIX=" out)) + (delete-file-recursively (string-append out "/share/metainfo"))))) (add-after 'wrap 'wrap-qt-process-path (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -- cgit 1.4.1 From 2b8d715da510357e9386ceaf15371c99019ce596 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 26 May 2022 17:28:04 +0300 Subject: gnu: qutebrowser: Find and wrap scripts. * gnu/packages/web-browsers.scm (qutebrowser)[inputs]: Add python-pynacl. [arguments]: Add custom phase to tell qutebrowser where to find installed userscripts. Add custom phase to wrap scripts with python libraries. --- gnu/packages/web-browsers.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gnu/packages/web-browsers.scm') diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index b12582dfed..01d71324ba 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -88,6 +88,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) @@ -484,6 +485,7 @@ interface.") python-jinja2 python-markupsafe python-pygments + python-pynacl python-pyyaml ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so ;; that it's __init__.py is used first. @@ -499,6 +501,13 @@ interface.") #:tests? #f #:phases (modify-phases %standard-phases + (add-after 'unpack 'find-userscripts + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "qutebrowser/commands/userscripts.py" + (("os.path.join.*system=True)") + (string-append "os.path.join(\"" + (assoc-ref outputs "out") + "\", \"share\", \"qutebrowser\""))))) (add-before 'check 'set-env-offscreen (lambda _ (setenv "QT_QPA_PLATFORM" "offscreen"))) @@ -510,6 +519,24 @@ interface.") ((".*setup\\.py.*") "")) (invoke "make" "install" (string-append "PREFIX=" out)) (delete-file-recursively (string-append out "/share/metainfo"))))) + (add-after 'install-more 'wrap-scripts + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref inputs "python")) + (path (string-append out "/lib/python" + ,(version-major+minor (package-version + python)) + "/site-packages:" + (getenv "GUIX_PYTHONPATH")))) + (for-each + (lambda (file) + (wrap-program file + `("GUIX_PYTHONPATH" ":" prefix (,path)))) + (append + (find-files + (string-append out "/share/qutebrowser/scripts") "\\.py$") + (find-files + (string-append out "/share/qutebrowser/userscripts"))))))) (add-after 'wrap 'wrap-qt-process-path (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) -- cgit 1.4.1