From 8aa66ccb554e4258c93b2d81271b71ad15651d8b Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 10 Jan 2021 20:06:14 +0100 Subject: gnu: obs: Update to 26.1.2. * gnu/packages/video.scm (obs): Update to 26.1.2. --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index b4a40f6ea6..b314e4903b 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -3078,7 +3078,7 @@ be used for realtime video capture via Linux-specific APIs.") (define-public obs (package (name "obs") - (version "26.1.1") + (version "26.1.2") (source (origin (method git-fetch) (uri (git-reference @@ -3087,7 +3087,7 @@ be used for realtime video capture via Linux-specific APIs.") (file-name (git-file-name name version)) (sha256 (base32 - "18b40ayww5isjqnjz63l05fi5xwzrcc64jvwxwq8nqsydn0b14ng")))) + "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc")))) (build-system cmake-build-system) (arguments `(#:configure-flags -- cgit v1.2.3 From d8fd1c177f51a85017e5b624c9e83cebda593c7b Mon Sep 17 00:00:00 2001 From: Michael Rohleder Date: Tue, 12 Jan 2021 10:41:08 +0100 Subject: gnu: mkvtoolnix: Update to 52.0.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/video.scm (mkvtoolnix): Update to 52.0.0. [inputs]: Add libdvdread to support dvd chapter. Signed-off-by: Ludovic Courtès --- gnu/packages/video.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index b314e4903b..cf7db757af 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -41,7 +41,7 @@ ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Guillaume Le Vaillant ;;; Copyright © 2020 Alex McGrath -;;; Copyright © 2020 Michael Rohleder +;;; Copyright © 2020, 2021 Michael Rohleder ;;; Copyright © 2020 Vinicius Monego ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2020 Alexandru-Sergiu Marton @@ -885,14 +885,14 @@ H.264 (MPEG-4 AVC) video streams.") (define-public mkvtoolnix (package (name "mkvtoolnix") - (version "51.0.0") + (version "52.0.0") (source (origin (method url-fetch) (uri (string-append "https://mkvtoolnix.download/sources/" "mkvtoolnix-" version ".tar.xz")) (sha256 - (base32 "0w2crz6wnfw18m9m4zrij1yplcq5drzhz8n58w9kp51wl48a0yn1")) + (base32 "15y7ahlifsclnkl70wn5w34dil8nwcwcjnw3k2ydqc6dz4vb0j5s")) (modules '((guix build utils))) (snippet '(begin ;; Delete bundled libraries. @@ -914,6 +914,7 @@ H.264 (MPEG-4 AVC) video streams.") ("file" ,file) ("flac" ,flac) ("fmt" ,fmt) + ("libdvdread" ,libdvdread) ("libmatroska" ,libmatroska) ("libogg" ,libogg) ("libvorbis" ,libvorbis) -- cgit v1.2.3 From c35d230c8f20c7b5ca5e848eeb01a1289c6a8b8f Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Sun, 17 Jan 2021 02:16:18 +0300 Subject: gnu: youtube-dl: Update to 2021.01.16. * gnu/packages/video.scm (youtube-dl): Update to 2021.01.16. --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index cf7db757af..37eb07855a 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2198,14 +2198,14 @@ To load this plugin, specify the following option when starting mpv: (define-public youtube-dl (package (name "youtube-dl") - (version "2021.01.08") + (version "2021.01.16") (source (origin (method url-fetch) (uri (string-append "https://youtube-dl.org/downloads/latest/" "youtube-dl-" version ".tar.gz")) (sha256 (base32 - "1k870v9xc7g16nvixa272sdjnmc7pl49ymmnn6rdz0mcj2548h3k")) + "1q8pvw5j45k8nvr3d9rvnhi6xaj1mdqlkrg7q7qq6zciq5r54fhi")) (snippet '(begin ;; Delete the pre-generated files, except for the man page -- cgit v1.2.3 From dc5d514362f41de3110114655a4baf4ad00c43b5 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Mon, 18 Jan 2021 18:57:11 +0100 Subject: gnu: motion: Update to 4.3.2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/video.scm (motion): Update to 4.3.2. [arguments]: In 'bootstrap' phase, adjust 'version.sh' file name. Signed-off-by: Ludovic Courtès --- gnu/packages/video.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 37eb07855a..7047616306 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -4161,7 +4161,7 @@ It counts more than 100 plugins.") (define-public motion (package (name "motion") - (version "4.2.2") + (version "4.3.2") (home-page "https://motion-project.github.io/") (source (origin (method git-fetch) @@ -4170,7 +4170,7 @@ It counts more than 100 plugins.") (commit (string-append "release-" version)))) (sha256 (base32 - "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f")) + "09xs815jsivcilpmnrx2jkcxirj4lg5kp99fkr0p2sdxw03myi95")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs @@ -4187,7 +4187,7 @@ It counts more than 100 plugins.") '(#:phases (modify-phases %standard-phases (replace 'bootstrap (lambda _ - (patch-shebang "version.sh") + (patch-shebang "scripts/version.sh") (invoke "autoreconf" "-vfi")))) #:configure-flags '("--sysconfdir=/etc") #:make-flags (list (string-append "sysconfdir=" -- cgit v1.2.3 From def314d810a57c99b75f6e797275e3045a6563e8 Mon Sep 17 00:00:00 2001 From: Michael Rohleder Date: Wed, 20 Jan 2021 02:21:17 +0100 Subject: gnu: vlc: Update to 3.0.12. * gnu/packages/video.scm (vlc): Update to 3.0.12. Signed-off-by: Leo Famulari --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 7047616306..97cb7d6837 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1771,7 +1771,7 @@ videoformats depend on the configuration flags of ffmpeg.") (define-public vlc (package (name "vlc") - (version "3.0.11.1") + (version "3.0.12") (source (origin (method url-fetch) (uri (string-append @@ -1780,7 +1780,7 @@ videoformats depend on the configuration flags of ffmpeg.") "/vlc-" version ".tar.xz")) (sha256 (base32 - "1f46h0hv7fk35zg4iczlp7ib7h2jmh8m4r5klw3g2558ib9134qq")))) + "0ygqihw2c5vvzv8950dlf7rdwz1cpz1668jgyja604ljibrmix7g")))) (build-system gnu-build-system) (native-inputs `(("flex" ,flex) -- cgit v1.2.3 From 5aeee07cc922bdc605bb6cb7c2cd365d2d42f4d6 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 27 Jan 2021 15:52:58 -0500 Subject: gnu: VLC: Remove obsolete patch. * gnu/packages/patches/vlc-qt-5.15.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/video.scm (vlc)[source]: Remove patch. --- gnu/local.mk | 1 - gnu/packages/patches/vlc-qt-5.15.patch | 56 ---------------------------------- gnu/packages/video.scm | 1 - 3 files changed, 58 deletions(-) delete mode 100644 gnu/packages/patches/vlc-qt-5.15.patch (limited to 'gnu/packages/video.scm') diff --git a/gnu/local.mk b/gnu/local.mk index f71d75135d..5590faf7d7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1710,7 +1710,6 @@ dist_patch_DATA = \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ %D%/packages/patches/vboot-utils-skip-test-workbuf.patch \ - %D%/packages/patches/vlc-qt-5.15.patch \ %D%/packages/patches/vigra-python-compat.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \ diff --git a/gnu/packages/patches/vlc-qt-5.15.patch b/gnu/packages/patches/vlc-qt-5.15.patch deleted file mode 100644 index e986a99861..0000000000 --- a/gnu/packages/patches/vlc-qt-5.15.patch +++ /dev/null @@ -1,56 +0,0 @@ -Fix build of VLC with Qt 5.15. Otherwise it fails like this: - ------- -In file included from gui/qt/util/timetooltip.moc.cpp:10:0: -gui/qt/util/timetooltip.hpp:49:18: error: field ‘mPainterPath’ has incomplete type ‘QPainterPath’ - QPainterPath mPainterPath; - ^~~~~~~~~~~~ -In file included from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qbrush.h:49:0, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qpalette.h:46, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/qwidget.h:48, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/QWidget:1, - from gui/qt/util/timetooltip.hpp:27, - from gui/qt/util/timetooltip.moc.cpp:10: -/gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qmatrix.h:54:7: note: forward declaration of ‘class QPainterPath’ - class QPainterPath; - ^~~~~~~~~~~~ -make[4]: *** [Makefile:25852: gui/qt/util/libqt_plugin_la-timetooltip.moc.lo] Error 1 ------- - -diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp -index 24db9d9..73c1779 100644 ---- a/modules/gui/qt/components/playlist/views.cpp -+++ b/modules/gui/qt/components/playlist/views.cpp -@@ -27,6 +27,7 @@ - #include "input_manager.hpp" /* THEMIM */ - - #include -+#include - #include - #include - #include -diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp -index d233382..69728eb 100644 ---- a/modules/gui/qt/dialogs/plugins.cpp -+++ b/modules/gui/qt/dialogs/plugins.cpp -@@ -53,6 +53,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/modules/gui/qt/util/timetooltip.hpp b/modules/gui/qt/util/timetooltip.hpp -index 6a1329e..9f50b18 100644 ---- a/modules/gui/qt/util/timetooltip.hpp -+++ b/modules/gui/qt/util/timetooltip.hpp -@@ -25,6 +25,7 @@ - #include "qt.hpp" - - #include -+#include - - class TimeTooltip : public QWidget - { - diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index cebb70d28e..cd049fb375 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1773,7 +1773,6 @@ videoformats depend on the configuration flags of ffmpeg.") "https://download.videolan.org/pub/videolan/vlc/" (car (string-split version #\-)) "/vlc-" version ".tar.xz")) - (patches (search-patches "vlc-qt-5.15.patch")) (sha256 (base32 "0ygqihw2c5vvzv8950dlf7rdwz1cpz1668jgyja604ljibrmix7g")))) -- cgit v1.2.3 From 9085260fccd17955be6922c215f89be3e424dda3 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Fri, 25 Dec 2020 23:02:18 +0100 Subject: guix: qt-build-system, qt-utils: Unify wrapping of qt-programs. Unify (guix qt-build-system wrap-all-programs) and (guix qt-utils wrap-qt-program), so both behave the same. The functions now reside in qt-utils to make them easily available for packages not using the qt-build-system. * guix/build/qt-build-system.scm (variables-for-wrapping, wrap-all-programs): Move from here ... * guix/build/qt-utils.scm (variables-for-wrapping, wrap-all-qt-programs): ... to here. Base the later on (wrap-qt-program*): New function, carved out from old wrap-all-programs. (wrap-qt-program): Base on wrap-qt-program*, change arguments in an incompatible way. * gnu/packages/bittorrent.scm (qbittorrent)[arguments]{wrap-qt}: Adjust to new interface of wrap-qt-program. * gnu/packages/finance.scm (electron-cash): Likewise. * gnu/packages/geo.scm (qgis): Likewise. * gnu/packages/password-utils.scm (qtpass): Likewise. * gnu/packages/video.scm (openshot): Likewise. * gnu/packages/web-browsers.scm (kristall): Likewise. --- gnu/packages/bittorrent.scm | 6 ++- gnu/packages/finance.scm | 8 +-- gnu/packages/geo.scm | 7 +-- gnu/packages/password-utils.scm | 6 ++- gnu/packages/video.scm | 6 ++- gnu/packages/web-browsers.scm | 5 +- guix/build-system/qt.scm | 1 + guix/build/qt-build-system.scm | 68 ++------------------------ guix/build/qt-utils.scm | 105 ++++++++++++++++++++++++++++++++-------- 9 files changed, 113 insertions(+), 99 deletions(-) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index 08e61d7ba2..6967eccec4 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2018 Nam Nguyen ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2019, 2020 Brett Gilio +;;; Copyright © 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -447,8 +448,9 @@ desktops.") #:phases (modify-phases %standard-phases (add-after 'install 'wrap-qt - (lambda* (#:key outputs #:allow-other-keys) - (wrap-qt-program (assoc-ref outputs "out") "qbittorrent") + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-qt-program "qbittorrent" #:output out #:inputs inputs)) #t))))) (native-inputs `(("pkg-config" ,pkg-config) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 8ead37beb3..1f1dadebb3 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016 Andreas Enge ;;; Copyright © 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2016 Alex Griffin -;;; Copyright © 2016 Hartmut Goebel +;;; Copyright © 2016, 2020 Hartmut Goebel ;;; Copyright © 2017 Carlo Zancanaro ;;; Copyright © 2017 Theodoros Foradis ;;; Copyright © 2017 Vasile Dumitrascu @@ -611,8 +611,10 @@ other machines/servers. Electrum does not download the Bitcoin blockchain.") (assoc-ref inputs "libsecp256k1") "/lib/libsecp256k1.so.0'"))))) (add-after 'install 'wrap-qt - (lambda* (#:key outputs #:allow-other-keys) - (wrap-qt-program (assoc-ref outputs "out") "electron-cash")))))) + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-qt-program "electron-cash" #:output out #:inputs inputs)) + #t))))) (home-page "https://electroncash.org/") (synopsis "Bitcoin Cash wallet") (description diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index c682613ff1..a90db90084 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2019, 2020 Guillaume Le Vaillant ;;; Copyright © 2019, 2020 Efraim Flashner ;;; Copyright © 2019 Wiktor Żelazny -;;; Copyright © 2019 Hartmut Goebel +;;; Copyright © 2019, 2020 Hartmut Goebel ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Christopher Baines ;;; Copyright © 2020 Felix Gruber @@ -2121,8 +2121,9 @@ growing set of geoscientific methods.") (add-after 'install 'wrap-python (assoc-ref python:%standard-phases 'wrap)) (add-after 'wrap-python 'wrap-qt - (lambda* (#:key outputs #:allow-other-keys) - (wrap-qt-program (assoc-ref outputs "out") "qgis") + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-qt-program "qgis" #:output out #:inputs inputs)) #t)) (add-after 'wrap-qt 'wrap-gis (lambda* (#:key inputs outputs #:allow-other-keys) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index 2053457375..c568efcf31 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -29,6 +29,7 @@ ;;; Copyright © 2020 Jean-Baptiste Note ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Vinicius Monego +;;; Copyright © 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -664,8 +665,9 @@ key URIs using the standard otpauth:// scheme.") (install-file "qtpass.1" man) #t))) (add-after 'install 'wrap-qt - (lambda* (#:key outputs #:allow-other-keys) - (wrap-qt-program (assoc-ref outputs "out") "qtpass") + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-qt-program "qtpass" #:output out #:inputs inputs)) #t)) (add-before 'check 'check-setup ;; Make Qt render "offscreen", required for tests. diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index cd049fb375..8e9c82d587 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -47,6 +47,7 @@ ;;; Copyright © 2020 Alexandru-Sergiu Marton ;;; Copyright © 2020 Ivan Kozlov ;;; Copyright © 2020 Antoine Côté +;;; Copyright © 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -4441,9 +4442,10 @@ API. It includes bindings for Python, Ruby, and other languages.") (setenv "HOME" "/tmp") #t)) (add-after 'install 'wrap-program - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key outputs inputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (wrap-qt-program out "openshot-qt")) + (wrap-qt-program "openshot-qt" + #:output out #:inputs inputs)) #t))))) (home-page "https://www.openshot.org/") (synopsis "Video editor") diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index b134d29782..1040e79593 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Nicolò Balzarotti ;;; Copyright © 2020 Alexandru-Sergiu Marton +;;; Copyright © 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -433,9 +434,9 @@ access.") "/share/fonts/truetype/NotoColorEmoji"))) #t)) (add-after 'install 'wrap-program - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key outputs inputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (wrap-qt-program out "kristall")) + (wrap-qt-program "kristall" #:output out #:inputs inputs)) #t))))) (native-inputs `(("breeze-stylesheet" diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index 118022ec45..1bd89bfa4d 100644 --- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -53,6 +53,7 @@ (define %qt-build-system-modules ;; Build-side modules imported and used by default. `((guix build qt-build-system) + (guix build qt-utils) ,@%cmake-build-system-modules)) (define (default-cmake) diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm index 005157b0a4..a6955ce4c2 100644 --- a/guix/build/qt-build-system.scm +++ b/guix/build/qt-build-system.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014 Federico Beffa ;;; Copyright © 2014, 2015 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver -;;; Copyright © 2019, 2020 Hartmut Goebel +;;; Copyright © 2019, 2020, 2021 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +22,7 @@ (define-module (guix build qt-build-system) #:use-module ((guix build cmake-build-system) #:prefix cmake:) #:use-module (guix build utils) + #:use-module (guix build qt-utils) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 ftw) @@ -47,73 +48,10 @@ (setenv "CTEST_OUTPUT_ON_FAILURE" "1") #t) -(define (variables-for-wrapping base-directories) - - (define (collect-sub-dirs base-directories subdirectory) - (filter-map - (lambda (dir) - (let ((directory (string-append dir subdirectory))) - (if (directory-exists? directory) directory #f))) - base-directories)) - - (filter - (lambda (var-to-wrap) (not (null? (last var-to-wrap)))) - (map - (lambda (var-spec) - `(,(first var-spec) = ,(collect-sub-dirs base-directories (last var-spec)))) - (list - ;; these shall match the search-path-specification for Qt and KDE - ;; libraries - '("XDG_DATA_DIRS" "/share") - '("XDG_CONFIG_DIRS" "/etc/xdg") - '("QT_PLUGIN_PATH" "/lib/qt5/plugins") - '("QML2_IMPORT_PATH" "/lib/qt5/qml"))))) - -(define* (wrap-all-programs #:key inputs outputs - (qt-wrap-excluded-outputs '()) - #:allow-other-keys) - "Implement phase \"qt-wrap\": look for GSettings schemas and -gtk+-v.0 libraries and create wrappers with suitably set environment variables -if found. - -Wrapping is not applied to outputs whose name is listed in -QT-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not -to contain any Qt binaries, and where wrapping would gratuitously -add a dependency of that output on Qt." - (define (find-files-to-wrap directory) - (append-map - (lambda (dir) - (if (directory-exists? dir) (find-files dir ".*") (list))) - (list (string-append directory "/bin") - (string-append directory "/sbin") - (string-append directory "/libexec") - (string-append directory "/lib/libexec")))) - - (define input-directories - ;; FIXME: Filter out unwanted inputs, e.g. cmake - (match inputs - (((_ . dir) ...) - dir))) - - (define handle-output - (match-lambda - ((output . directory) - (unless (member output qt-wrap-excluded-outputs) - (let ((bin-list (find-files-to-wrap directory)) - (vars-to-wrap (variables-for-wrapping - (append (list directory) - input-directories)))) - (when (not (null? vars-to-wrap)) - (for-each (cut apply wrap-program <> vars-to-wrap) - bin-list))))))) - - (for-each handle-output outputs) - #t) - (define %standard-phases (modify-phases cmake:%standard-phases (add-before 'check 'check-setup check-setup) - (add-after 'install 'qt-wrap wrap-all-programs))) + (add-after 'install 'qt-wrap wrap-all-qt-programs))) (define* (qt-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm index d2486ee86c..3fbdb6be61 100644 --- a/guix/build/qt-utils.scm +++ b/guix/build/qt-utils.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 David Craven +;;; Copyright © 2019, 2020, 2021 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,23 +19,87 @@ (define-module (guix build qt-utils) #:use-module (guix build utils) - #:export (wrap-qt-program)) - -(define (wrap-qt-program out program) - (define (suffix env-var path) - (let ((env-val (getenv env-var))) - (if env-val (string-append env-val ":" path) path))) - - (let ((qml-path (suffix "QML2_IMPORT_PATH" - (string-append out "/lib/qt5/qml"))) - (plugin-path (suffix "QT_PLUGIN_PATH" - (string-append out "/lib/qt5/plugins"))) - (xdg-data-path (suffix "XDG_DATA_DIRS" - (string-append out "/share"))) - (xdg-config-path (suffix "XDG_CONFIG_DIRS" - (string-append out "/etc/xdg")))) - (wrap-program (string-append out "/bin/" program) - `("QML2_IMPORT_PATH" = (,qml-path)) - `("QT_PLUGIN_PATH" = (,plugin-path)) - `("XDG_DATA_DIRS" = (,xdg-data-path)) - `("XDG_CONFIG_DIRS" = (,xdg-config-path))))) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:export (wrap-qt-program + wrap-all-qt-programs)) + + +(define (variables-for-wrapping base-directories) + + (define (collect-sub-dirs base-directories subdirectory) + (filter-map + (lambda (dir) + (let ((directory (string-append dir subdirectory))) + (if (directory-exists? directory) directory #f))) + base-directories)) + + (filter + (lambda (var-to-wrap) (not (null? (last var-to-wrap)))) + (map + (lambda (var-spec) + `(,(first var-spec) = ,(collect-sub-dirs base-directories (last var-spec)))) + (list + ;; these shall match the search-path-specification for Qt and KDE + ;; libraries + '("XDG_DATA_DIRS" "/share") + '("XDG_CONFIG_DIRS" "/etc/xdg") + '("QT_PLUGIN_PATH" "/lib/qt5/plugins") + '("QML2_IMPORT_PATH" "/lib/qt5/qml"))))) + + +(define* (wrap-qt-program* program #:key inputs output-dir) + + (define input-directories + ;; FIXME: Filter out unwanted inputs, e.g. cmake + (match inputs + (((_ . dir) ...) + dir))) + + (let ((vars-to-wrap (variables-for-wrapping + (cons output-dir input-directories)))) + (when (not (null? vars-to-wrap)) + (apply wrap-program program vars-to-wrap)))) + + +(define* (wrap-qt-program program-name #:key inputs output) + "Wrap the specified programm (which must reside in the OUTPUT's \"/bin\" +directory) with suitably set environment variables. + +This is like qt-build-systems's phase \"qt-wrap\", but only the named program +is wrapped." + (wrap-qt-program* (string-append output "/bin/" program-name) + #:output-dir output #:inputs inputs)) + + +(define* (wrap-all-qt-programs #:key inputs outputs + (qt-wrap-excluded-outputs '()) + #:allow-other-keys) + "Implement qt-build-systems's phase \"qt-wrap\": look for executables in +\"bin\", \"sbin\" and \"libexec\" of all outputs and create wrappers with +suitably set environment variables if found. + +Wrapping is not applied to outputs whose name is listed in +QT-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not +to contain any Qt binaries, and where wrapping would gratuitously +add a dependency of that output on Qt." + (define (find-files-to-wrap output-dir) + (append-map + (lambda (dir) + (if (directory-exists? dir) (find-files dir ".*") (list))) + (list (string-append output-dir "/bin") + (string-append output-dir "/sbin") + (string-append output-dir "/libexec") + (string-append output-dir "/lib/libexec")))) + + (define handle-output + (match-lambda + ((output . output-dir) + (unless (member output qt-wrap-excluded-outputs) + (for-each (cut wrap-qt-program* <> + #:output-dir output-dir #:inputs inputs) + (find-files-to-wrap output-dir)))))) + + (for-each handle-output outputs) + #t) -- cgit v1.2.3 From 918a099e7422fe8ad3464dc5a1b4f60843297742 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 30 Jan 2021 18:03:25 -0500 Subject: Revert qt-build-system changes that were pushed to a frozen "staging" branch. This reverts commits 9085260fccd17955be6922c215f89be3e424dda3, 4ecc2a24936a1fbfe3ff5654090d41e91c2fe8f2, 094b6ac00939ef5e3f291a477fedd26621078ca8, 104151f4f45f4bc3a816e3ad42256452932e0d8d. --- gnu/packages/bittorrent.scm | 6 +- gnu/packages/finance.scm | 8 +-- gnu/packages/geo.scm | 7 +-- gnu/packages/password-utils.scm | 6 +- gnu/packages/video.scm | 6 +- gnu/packages/web-browsers.scm | 5 +- guix/build-system/qt.scm | 6 -- guix/build/qt-build-system.scm | 68 +++++++++++++++++++- guix/build/qt-utils.scm | 135 ++++++---------------------------------- 9 files changed, 99 insertions(+), 148 deletions(-) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index 6967eccec4..08e61d7ba2 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -10,7 +10,6 @@ ;;; Copyright © 2018 Nam Nguyen ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2019, 2020 Brett Gilio -;;; Copyright © 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -448,9 +447,8 @@ desktops.") #:phases (modify-phases %standard-phases (add-after 'install 'wrap-qt - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (wrap-qt-program "qbittorrent" #:output out #:inputs inputs)) + (lambda* (#:key outputs #:allow-other-keys) + (wrap-qt-program (assoc-ref outputs "out") "qbittorrent") #t))))) (native-inputs `(("pkg-config" ,pkg-config) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 1f1dadebb3..8ead37beb3 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016 Andreas Enge ;;; Copyright © 2016, 2017, 2018 Efraim Flashner ;;; Copyright © 2016 Alex Griffin -;;; Copyright © 2016, 2020 Hartmut Goebel +;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2017 Carlo Zancanaro ;;; Copyright © 2017 Theodoros Foradis ;;; Copyright © 2017 Vasile Dumitrascu @@ -611,10 +611,8 @@ other machines/servers. Electrum does not download the Bitcoin blockchain.") (assoc-ref inputs "libsecp256k1") "/lib/libsecp256k1.so.0'"))))) (add-after 'install 'wrap-qt - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (wrap-qt-program "electron-cash" #:output out #:inputs inputs)) - #t))))) + (lambda* (#:key outputs #:allow-other-keys) + (wrap-qt-program (assoc-ref outputs "out") "electron-cash")))))) (home-page "https://electroncash.org/") (synopsis "Bitcoin Cash wallet") (description diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index a90db90084..c682613ff1 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2019, 2020 Guillaume Le Vaillant ;;; Copyright © 2019, 2020 Efraim Flashner ;;; Copyright © 2019 Wiktor Żelazny -;;; Copyright © 2019, 2020 Hartmut Goebel +;;; Copyright © 2019 Hartmut Goebel ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Christopher Baines ;;; Copyright © 2020 Felix Gruber @@ -2121,9 +2121,8 @@ growing set of geoscientific methods.") (add-after 'install 'wrap-python (assoc-ref python:%standard-phases 'wrap)) (add-after 'wrap-python 'wrap-qt - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (wrap-qt-program "qgis" #:output out #:inputs inputs)) + (lambda* (#:key outputs #:allow-other-keys) + (wrap-qt-program (assoc-ref outputs "out") "qgis") #t)) (add-after 'wrap-qt 'wrap-gis (lambda* (#:key inputs outputs #:allow-other-keys) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index c568efcf31..2053457375 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -29,7 +29,6 @@ ;;; Copyright © 2020 Jean-Baptiste Note ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Vinicius Monego -;;; Copyright © 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -665,9 +664,8 @@ key URIs using the standard otpauth:// scheme.") (install-file "qtpass.1" man) #t))) (add-after 'install 'wrap-qt - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (wrap-qt-program "qtpass" #:output out #:inputs inputs)) + (lambda* (#:key outputs #:allow-other-keys) + (wrap-qt-program (assoc-ref outputs "out") "qtpass") #t)) (add-before 'check 'check-setup ;; Make Qt render "offscreen", required for tests. diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 8e9c82d587..cd049fb375 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -47,7 +47,6 @@ ;;; Copyright © 2020 Alexandru-Sergiu Marton ;;; Copyright © 2020 Ivan Kozlov ;;; Copyright © 2020 Antoine Côté -;;; Copyright © 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -4442,10 +4441,9 @@ API. It includes bindings for Python, Ruby, and other languages.") (setenv "HOME" "/tmp") #t)) (add-after 'install 'wrap-program - (lambda* (#:key outputs inputs #:allow-other-keys) + (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (wrap-qt-program "openshot-qt" - #:output out #:inputs inputs)) + (wrap-qt-program out "openshot-qt")) #t))))) (home-page "https://www.openshot.org/") (synopsis "Video editor") diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 1040e79593..b134d29782 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -15,7 +15,6 @@ ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Nicolò Balzarotti ;;; Copyright © 2020 Alexandru-Sergiu Marton -;;; Copyright © 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -434,9 +433,9 @@ access.") "/share/fonts/truetype/NotoColorEmoji"))) #t)) (add-after 'install 'wrap-program - (lambda* (#:key outputs inputs #:allow-other-keys) + (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (wrap-qt-program "kristall" #:output out #:inputs inputs)) + (wrap-qt-program out "kristall")) #t))))) (native-inputs `(("breeze-stylesheet" diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index e1368db1d9..118022ec45 100644 --- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -3,7 +3,6 @@ ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2019 Hartmut Goebel -;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,8 +22,6 @@ (define-module (guix build-system qt) #:use-module (guix store) #:use-module (guix utils) - #:use-module ((guix build qt-utils) - #:select (%qt-wrap-excluded-inputs)) #:use-module (guix derivations) #:use-module (guix search-paths) #:use-module (guix build-system) @@ -56,7 +53,6 @@ (define %qt-build-system-modules ;; Build-side modules imported and used by default. `((guix build qt-build-system) - (guix build qt-utils) ,@%cmake-build-system-modules)) (define (default-cmake) @@ -128,7 +124,6 @@ (phases '(@ (guix build qt-build-system) %standard-phases)) (qt-wrap-excluded-outputs ''()) - (qt-wrap-excluded-inputs %qt-wrap-excluded-inputs) (system (%current-system)) (imported-modules %qt-build-system-modules) (modules '((guix build qt-build-system) @@ -152,7 +147,6 @@ provides a 'CMakeLists.txt' file as its build system." search-paths) #:phases ,phases #:qt-wrap-excluded-outputs ,qt-wrap-excluded-outputs - #:qt-wrap-excluded-inputs ,qt-wrap-excluded-inputs #:configure-flags ,configure-flags #:make-flags ,make-flags #:out-of-source? ,out-of-source? diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm index a6955ce4c2..005157b0a4 100644 --- a/guix/build/qt-build-system.scm +++ b/guix/build/qt-build-system.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014 Federico Beffa ;;; Copyright © 2014, 2015 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver -;;; Copyright © 2019, 2020, 2021 Hartmut Goebel +;;; Copyright © 2019, 2020 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,7 +22,6 @@ (define-module (guix build qt-build-system) #:use-module ((guix build cmake-build-system) #:prefix cmake:) #:use-module (guix build utils) - #:use-module (guix build qt-utils) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 ftw) @@ -48,10 +47,73 @@ (setenv "CTEST_OUTPUT_ON_FAILURE" "1") #t) +(define (variables-for-wrapping base-directories) + + (define (collect-sub-dirs base-directories subdirectory) + (filter-map + (lambda (dir) + (let ((directory (string-append dir subdirectory))) + (if (directory-exists? directory) directory #f))) + base-directories)) + + (filter + (lambda (var-to-wrap) (not (null? (last var-to-wrap)))) + (map + (lambda (var-spec) + `(,(first var-spec) = ,(collect-sub-dirs base-directories (last var-spec)))) + (list + ;; these shall match the search-path-specification for Qt and KDE + ;; libraries + '("XDG_DATA_DIRS" "/share") + '("XDG_CONFIG_DIRS" "/etc/xdg") + '("QT_PLUGIN_PATH" "/lib/qt5/plugins") + '("QML2_IMPORT_PATH" "/lib/qt5/qml"))))) + +(define* (wrap-all-programs #:key inputs outputs + (qt-wrap-excluded-outputs '()) + #:allow-other-keys) + "Implement phase \"qt-wrap\": look for GSettings schemas and +gtk+-v.0 libraries and create wrappers with suitably set environment variables +if found. + +Wrapping is not applied to outputs whose name is listed in +QT-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not +to contain any Qt binaries, and where wrapping would gratuitously +add a dependency of that output on Qt." + (define (find-files-to-wrap directory) + (append-map + (lambda (dir) + (if (directory-exists? dir) (find-files dir ".*") (list))) + (list (string-append directory "/bin") + (string-append directory "/sbin") + (string-append directory "/libexec") + (string-append directory "/lib/libexec")))) + + (define input-directories + ;; FIXME: Filter out unwanted inputs, e.g. cmake + (match inputs + (((_ . dir) ...) + dir))) + + (define handle-output + (match-lambda + ((output . directory) + (unless (member output qt-wrap-excluded-outputs) + (let ((bin-list (find-files-to-wrap directory)) + (vars-to-wrap (variables-for-wrapping + (append (list directory) + input-directories)))) + (when (not (null? vars-to-wrap)) + (for-each (cut apply wrap-program <> vars-to-wrap) + bin-list))))))) + + (for-each handle-output outputs) + #t) + (define %standard-phases (modify-phases cmake:%standard-phases (add-before 'check 'check-setup check-setup) - (add-after 'install 'qt-wrap wrap-all-qt-programs))) + (add-after 'install 'qt-wrap wrap-all-programs))) (define* (qt-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm index 8e6db10ca1..d2486ee86c 100644 --- a/guix/build/qt-utils.scm +++ b/guix/build/qt-utils.scm @@ -1,7 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 David Craven -;;; Copyright © 2019, 2020, 2021 Hartmut Goebel -;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,116 +18,23 @@ (define-module (guix build qt-utils) #:use-module (guix build utils) - #:use-module (ice-9 match) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:export (wrap-qt-program - wrap-all-qt-programs - %qt-wrap-excluded-inputs)) - -(define %qt-wrap-excluded-inputs - '(list "cmake" "extra-cmake-modules" "qttools")) - -;; NOTE: Apart from standard subdirectories of /share, Qt also provides -;; facilities for per-application data directories, such as -;; /share/quassel. Thus, we include the output directory even if it doesn't -;; contain any of the standard subdirectories. -(define (variables-for-wrapping base-directories output-directory) - - (define (collect-sub-dirs base-directories subdirectory-spec) - (filter-map - (lambda (dir) - (match - subdirectory-spec - ((subdir) - (and (directory-exists? (string-append dir subdir)) - (string-append dir (car subdirectory-spec)))) - ((subdir children) - (and - (or - (and (string=? dir output-directory) - (directory-exists? (string-append dir subdir))) - (or-map - (lambda (kid) (directory-exists? (string-append dir subdir kid))) - children)) - (string-append dir subdir))))) - base-directories)) - - (filter - (lambda (var-to-wrap) (not (null? (last var-to-wrap)))) - (map - (match-lambda - ((var kind . subdir-spec) - `(,var ,kind ,(collect-sub-dirs base-directories subdir-spec)))) - (list - ;; these shall match the search-path-specification for Qt and KDE - ;; libraries - '("XDG_DATA_DIRS" suffix "/share" ("/applications" "/fonts" - "/icons" "/mime")) - '("XDG_CONFIG_DIRS" suffix "/etc/xdg") - '("QT_PLUGIN_PATH" prefix "/lib/qt5/plugins") - '("QML2_IMPORT_PATH" prefix "/lib/qt5/qml"))))) - - -(define* (wrap-qt-program* program #:key inputs output-dir - qt-wrap-excluded-inputs) - - (define input-directories - (filter-map - (match-lambda - ((label . directory) - (and (not (member label qt-wrap-excluded-inputs)) - directory))) - inputs)) - - (let ((vars-to-wrap (variables-for-wrapping - (cons output-dir input-directories) - output-dir))) - (when (not (null? vars-to-wrap)) - (apply wrap-program program vars-to-wrap)))) - - -(define* (wrap-qt-program program-name #:key inputs output - (qt-wrap-excluded-inputs %qt-wrap-excluded-inputs)) - "Wrap the specified programm (which must reside in the OUTPUT's \"/bin\" -directory) with suitably set environment variables. - -This is like qt-build-systems's phase \"qt-wrap\", but only the named program -is wrapped." - (wrap-qt-program* (string-append output "/bin/" program-name) - #:output-dir output #:inputs inputs - #:qt-wrap-excluded-inputs qt-wrap-excluded-inputs)) - - -(define* (wrap-all-qt-programs #:key inputs outputs - (qt-wrap-excluded-outputs '()) - (qt-wrap-excluded-inputs %qt-wrap-excluded-inputs) - #:allow-other-keys) - "Implement qt-build-systems's phase \"qt-wrap\": look for executables in -\"bin\", \"sbin\" and \"libexec\" of all outputs and create wrappers with -suitably set environment variables if found. - -Wrapping is not applied to outputs whose name is listed in -QT-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not -to contain any Qt binaries, and where wrapping would gratuitously -add a dependency of that output on Qt." - (define (find-files-to-wrap output-dir) - (append-map - (lambda (dir) - (if (directory-exists? dir) (find-files dir ".*") (list))) - (list (string-append output-dir "/bin") - (string-append output-dir "/sbin") - (string-append output-dir "/libexec") - (string-append output-dir "/lib/libexec")))) - - (define handle-output - (match-lambda - ((output . output-dir) - (unless (member output qt-wrap-excluded-outputs) - (for-each (cut wrap-qt-program* <> - #:output-dir output-dir #:inputs inputs - #:qt-wrap-excluded-inputs qt-wrap-excluded-inputs) - (find-files-to-wrap output-dir)))))) - - (for-each handle-output outputs) - #t) + #:export (wrap-qt-program)) + +(define (wrap-qt-program out program) + (define (suffix env-var path) + (let ((env-val (getenv env-var))) + (if env-val (string-append env-val ":" path) path))) + + (let ((qml-path (suffix "QML2_IMPORT_PATH" + (string-append out "/lib/qt5/qml"))) + (plugin-path (suffix "QT_PLUGIN_PATH" + (string-append out "/lib/qt5/plugins"))) + (xdg-data-path (suffix "XDG_DATA_DIRS" + (string-append out "/share"))) + (xdg-config-path (suffix "XDG_CONFIG_DIRS" + (string-append out "/etc/xdg")))) + (wrap-program (string-append out "/bin/" program) + `("QML2_IMPORT_PATH" = (,qml-path)) + `("QT_PLUGIN_PATH" = (,plugin-path)) + `("XDG_DATA_DIRS" = (,xdg-data-path)) + `("XDG_CONFIG_DIRS" = (,xdg-config-path))))) -- cgit v1.2.3 From 5be01dcdc1c8fa89fd120919258b574c844c13cb Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Fri, 15 Jan 2021 17:26:37 +0100 Subject: gnu: obs: Use an environment variable for plugins location. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/video.scm (obs): Use it. * gnu/packages/patches/obs-modules-location.patch: Patch it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/patches/obs-modules-location.patch | 33 +++++++++++++++++++++++++ gnu/packages/video.scm | 14 ++++++++++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/obs-modules-location.patch (limited to 'gnu/packages/video.scm') diff --git a/gnu/local.mk b/gnu/local.mk index d53ed440f9..49a5925280 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1411,6 +1411,7 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-dbpagesize-binpower.patch \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ + %D%/packages/patches/obs-modules-location.patch \ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ %D%/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ diff --git a/gnu/packages/patches/obs-modules-location.patch b/gnu/packages/patches/obs-modules-location.patch new file mode 100644 index 0000000000..18b286d006 --- /dev/null +++ b/gnu/packages/patches/obs-modules-location.patch @@ -0,0 +1,33 @@ +From d250434e6c8eb4f8c8cb47ef3cc6e6de8fa8f828 Mon Sep 17 00:00:00 2001 +From: Alexey Abramov +Date: Fri, 15 Jan 2021 17:07:17 +0100 +Subject: [PATCH] Use environment variable for a default module location + +diff --git a/libobs/obs-nix.c b/libobs/obs-nix.c +index 382fa0546..481ea0f14 100644 +*** a/libobs/obs-nix.c +--- b/libobs/obs-nix.c +@@ -66,8 +66,19 @@ + + void add_default_module_paths(void) + { +- for (int i = 0; i < module_patterns_size; i++) +- obs_add_module_path(module_bin[i], module_data[i]); ++ char *bin_directory = getenv("OBS_PLUGINS_DIRECTORY"); ++ char *data_directory = getenv("OBS_PLUGINS_DATA_DIRECTORY"); ++ if (bin_directory && data_directory) { ++ struct dstr dstr_data_directory; ++ dstr_init_copy(&dstr_data_directory, data_directory); ++ dstr_cat(&dstr_data_directory, "/%module%"); ++ obs_add_module_path(bin_directory, dstr_data_directory.array); ++ dstr_free(&dstr_data_directory); ++ ++ } else { ++ for (int i = 0; i < module_patterns_size; i++) ++ obs_add_module_path(module_bin[i], module_data[i]); ++ } + } + + /* +-- +2.29.2 \ No newline at end of file diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index cd049fb375..ef80cb4cc2 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -47,6 +47,7 @@ ;;; Copyright © 2020 Alexandru-Sergiu Marton ;;; Copyright © 2020 Ivan Kozlov ;;; Copyright © 2020 Antoine Côté +;;; Copyright © 2021 Alexey Abramov ;;; ;;; This file is part of GNU Guix. ;;; @@ -3083,7 +3084,9 @@ be used for realtime video capture via Linux-specific APIs.") (file-name (git-file-name name version)) (sha256 (base32 - "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc")))) + "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc")) + (patches + (search-patches "obs-modules-location.patch")))) (build-system cmake-build-system) (arguments `(#:configure-flags @@ -3098,6 +3101,15 @@ be used for realtime video capture via Linux-specific APIs.") (wrap-program (string-append out "/bin/obs") `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))) #t))))) + (native-search-paths + (list (search-path-specification + (variable "OBS_PLUGINS_DIRECTORY") + (separator #f) ;single entry + (files '("lib/obs-plugins"))) + (search-path-specification + (variable "OBS_PLUGINS_DATA_DIRECTORY") + (separator #f) ;single entry + (files '("share/obs/obs-plugins"))))) (native-inputs `(("cmocka" ,cmocka) ("pkg-config" ,pkg-config))) -- cgit v1.2.3 From deadd9789759a66426707f52a9308e671c717d13 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Mon, 18 Jan 2021 19:39:44 +0300 Subject: gnu: Add obs-spectralizer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/video.scm (obs-spectralizer): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/video.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index ef80cb4cc2..19ecd6072c 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -3141,6 +3141,33 @@ and JACK.") (home-page "https://obsproject.com") (license license:gpl2+))) +(define-public obs-spectralizer + (package + (name "obs-spectralizer") + (version "1.3.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/univrsal/spectralizer") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0q75cnyqydpvfda51zm9gxqj3wqr99ad0lxzjhw0ld67qvj1ag6i")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f + #:configure-flags + (list "-DGLOBAL_INSTALLATION=ON" "-DUSE_CMAKE_LIBDIR=ON"))) + (inputs `(("obs" ,obs) + ("fftw" ,fftw))) + (home-page "https://github.com/univrsal/spectralizer") + (synopsis "OBS plugin for audio visualization") + (description "This OBS plugins allows you to vizualize MPD and internal +OBS audio sources.") + (license license:gpl2))) + (define-public libvdpau (package (name "libvdpau") -- cgit v1.2.3 From 84929062e3b6601dad5a8a97776c90ba4a4bf731 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 2 Feb 2021 10:48:36 +0100 Subject: gnu: obs-spectralizer: Remove bundled Windows DLLs. * gnu/packages/video.scm (obs-spectralizer)[source]: Add 'snippet' and 'modules'. --- gnu/packages/video.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 19ecd6072c..ffa7e25023 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -3152,6 +3152,11 @@ and JACK.") (url "https://github.com/univrsal/spectralizer") (commit (string-append "v" version)))) (file-name (git-file-name name version)) + + ;; Remove bundled Windows DLLs. + (snippet '(delete-file-recursively "fftw3")) + (modules '((guix build utils))) + (sha256 (base32 "0q75cnyqydpvfda51zm9gxqj3wqr99ad0lxzjhw0ld67qvj1ag6i")))) -- cgit v1.2.3 From aee9f696b1d9bd3c41dddc81997a4f0e73081cea Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Mon, 18 Jan 2021 19:27:43 +0300 Subject: gnu: Add obs-wlrobs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/video.scm (obs-wlrobs): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/video.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'gnu/packages/video.scm') diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index ffa7e25023..4c555a5622 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -48,6 +48,7 @@ ;;; Copyright © 2020 Ivan Kozlov ;;; Copyright © 2020 Antoine Côté ;;; Copyright © 2021 Alexey Abramov +;;; Copyright © 2021 Andrew Tropin ;;; ;;; This file is part of GNU Guix. ;;; @@ -74,6 +75,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix svn-download) + #:use-module (guix hg-download) #:use-module (guix build-system cargo) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) @@ -3173,6 +3175,35 @@ and JACK.") OBS audio sources.") (license license:gpl2))) +(define-public obs-wlrobs + (package + (name "obs-wlrobs") + (version "1.0") + (source + (origin + (method hg-fetch) + (uri (hg-reference + (url "https://hg.sr.ht/~scoopta/wlrobs") + (changeset (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1faiq2gdb7qis3m1hilm4pz8lkmkab75vzm608dbiazahhybf96p")))) + (build-system meson-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs `() ) + (inputs `(("obs" ,obs) + ("libx11" ,libx11 "out") + ("wayland" ,wayland) + ("wayland-protocols" ,wayland-protocols))) + (home-page "https://hg.sr.ht/~scoopta/wlrobs") + (synopsis "OBS plugin for Wayland (wlroots) screen capture") + (description + "This OBS plugin allows you to capture the screen on wlroots-based +Wayland compositors.") + (license license:gpl3+))) + (define-public libvdpau (package (name "libvdpau") -- cgit v1.2.3