diff options
author | Franz Geffke <franz@pantherx.org> | 2023-11-06 20:08:14 +0000 |
---|---|---|
committer | Franz Geffke <franz@pantherx.org> | 2023-11-06 20:08:14 +0000 |
commit | 47b4c9c854915df93893dbaa993accfacf9027fe (patch) | |
tree | 4f9b1742d63fcfbc94cc6b8d84f76c4d00c3a0b7 /px/packages/desktop-tools.scm | |
parent | 0b426d7b7ed8e176bf464ef9e0683f74a6c9d20f (diff) |
rewrite: apply guix-reference formatting; cleanup some module imports
Diffstat (limited to 'px/packages/desktop-tools.scm')
-rw-r--r-- | px/packages/desktop-tools.scm | 488 |
1 files changed, 250 insertions, 238 deletions
diff --git a/px/packages/desktop-tools.scm b/px/packages/desktop-tools.scm index b5ab50a..1cfd004 100644 --- a/px/packages/desktop-tools.scm +++ b/px/packages/desktop-tools.scm @@ -1,12 +1,13 @@ ;;; PantherX Desktop Packages and Tools -;;; Author: Reza Alizadeh Majd (r.majd@pantherx.org) +;;; Reza Alizadeh Majd (r.majd@pantherx.org) ;;; ;;; Note: This module is exported from (px packages desktop) to prevent ;;; circular import problem. ;;; (define-module (px packages desktop-tools) - #:use-module ((guix licenses) #:prefix license:) + #:use-module ((guix licenses) + #:prefix license:) #:use-module (guix build-system cmake) #:use-module (guix build-system qt) #:use-module (guix build-system copy) @@ -39,48 +40,52 @@ #:use-module (px packages images) #:use-module (srfi srfi-1)) - (define-public px-recoll (package (inherit recoll) (name "px-recoll") (arguments - '(#:tests? #f - #:configure-flags '("--disable-webkit" ; no qtwebkit yet - "--with-inotify" - "--enable-recollq" - "QMAKEPATH=") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-icon - (lambda _ - ;;Update icon - (substitute* '("desktop/recoll-searchgui.desktop") - (("Icon=recoll") - "Icon=preferences-desktop-search")) - (substitute* '("qtgui/main.cpp") - (("app.setWindowIcon\\(icon\\)") - "app.setWindowIcon(QIcon::fromTheme(\"preferences-desktop-search\"))")) - (substitute* '("qtgui/rclmain_w.cpp") - (("QIcon\\(QString\\(\":/images/recoll.png\"\\)\\)") - "QIcon::fromTheme(\"preferences-desktop-search\")")) - ;;Enable show tray icon - (substitute* '("qtgui/guiutils.cpp") - (("showTrayIcon\", Bool, false") "showTrayIcon\", Bool, true")) - ;;Enable show close to tray - (substitute* '("qtgui/guiutils.cpp") - (("closeToTray\", Bool, false") "closeToTray\", Bool, true")) - ;;Enable desktop notification - (substitute* '("qtgui/guiutils.cpp"); - (("trayMessages\", Bool, false") "trayMessages\", Bool, true")) - ;;Rename Recoll to Advanced Search - (substitute* '("desktop/recoll-searchgui.desktop"); - (("Name=Recoll") "Name=Advanced Search")) - ;;Update category to Settings - (substitute* '("desktop/recoll-searchgui.desktop"); - (("Categories=Qt;Utility;Filesystem;Database;") "Categories=Settings;")) - #t))))))) - + '(#:tests? #f + #:configure-flags '("--disable-webkit" ;no qtwebkit yet + "--with-inotify" "--enable-recollq" "QMAKEPATH=") + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-icon + (lambda _ + ;; Update icon + (substitute* '("desktop/recoll-searchgui.desktop") + (("Icon=recoll") + "Icon=preferences-desktop-search")) + (substitute* '("qtgui/main.cpp") + (("app.setWindowIcon\\(icon\\)") + "app.setWindowIcon(QIcon::fromTheme(\"preferences-desktop-search\"))")) + (substitute* '("qtgui/rclmain_w.cpp") + (("QIcon\\(QString\\(\":/images/recoll.png\"\\)\\)") + "QIcon::fromTheme(\"preferences-desktop-search\")")) + ;; Enable show tray icon + (substitute* '("qtgui/guiutils.cpp") + (("showTrayIcon\", Bool, false") + "showTrayIcon\", Bool, true")) + ;; Enable show close to tray + (substitute* '("qtgui/guiutils.cpp") + (("closeToTray\", Bool, false") + "closeToTray\", Bool, true")) + ;; Enable desktop notification + (substitute* '("qtgui/guiutils.cpp") + ; + (("trayMessages\", Bool, false") + "trayMessages\", Bool, true")) + ;; Rename Recoll to Advanced Search + (substitute* '("desktop/recoll-searchgui.desktop") + ; + (("Name=Recoll") + "Name=Advanced Search")) + ;; Update category to Settings + (substitute* '("desktop/recoll-searchgui.desktop") + ; + (("Categories=Qt;Utility;Filesystem;Database;") + "Categories=Settings;")) + #t))))))) + (define-public albert-launcher (package (name "albert-launcher") @@ -88,125 +93,129 @@ (source (origin (method git-fetch) - (uri (git-reference - (url "https://github.com/albertlauncher/albert") - (commit "579d063b8e90fd854fd4738480c2d8dc833f908e") - (recursive? #t))) + (uri (git-reference + (url "https://github.com/albertlauncher/albert") + (commit "579d063b8e90fd854fd4738480c2d8dc833f908e") + (recursive? #t))) (sha256 (base32 "1cqh4nsvxwarxm7v0fyzabph3c2ff3ap0q2xi2h4c0s2snrk4qh4")) - (file-name (git-file-name name version)))) + (file-name (git-file-name name version)))) (build-system cmake-build-system) (arguments - '(#:tests? #f - #:configure-flags '("-DBUILD_VIRTUALBOX=OFF" "-DCMAKE_INSTALL_LIBDIR=libs") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-cmakelists - (lambda _ - ;; path-main-cpp-add-plugin-dirs - (substitute* '("src/app/main.cpp") - (("QStringList dirs = \\{") (string-append "QStringList dirs = {\"" %output "/libs\", " ))) - ;; Adding X11Extras to target_link_libraries of widgetboxmodel plugin - (substitute* '("plugins/widgetboxmodel/CMakeLists.txt") - (("COMPONENTS Widgets") "COMPONENTS Widgets X11Extras")) - (substitute* '("plugins/widgetboxmodel/CMakeLists.txt") - (("Qt5::Widgets") "Qt5::Widgets Qt5::X11Extras X11")) - ;; Adding X11Extras to target_link_libraries of qmlboxmodel plugin - (substitute* '("plugins/qmlboxmodel/CMakeLists.txt") - (("COMPONENTS Widgets") "COMPONENTS Widgets X11Extras")) - (substitute* '("plugins/qmlboxmodel/CMakeLists.txt") - (("Qt5::Widgets") "Qt5::Widgets Qt5::X11Extras X11")) - #t))))) - (native-inputs `( - ("libx11" ,libx11) - ("muparser" ,muparser) - ("pkg-config" ,pkg-config) - ("python3" ,python) - ("qtbase" ,qtbase-5) - ("qtcharts" ,qtcharts) - ("qtdeclarative" ,qtdeclarative-5) - ("qtsvg" ,qtsvg-5) - ("qtx11extras" ,qtx11extras))) + '(#:tests? #f + #:configure-flags '("-DBUILD_VIRTUALBOX=OFF" + "-DCMAKE_INSTALL_LIBDIR=libs") + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-cmakelists + (lambda _ + ;; path-main-cpp-add-plugin-dirs + (substitute* '("src/app/main.cpp") + (("QStringList dirs = \\{") + (string-append "QStringList dirs = {\"" %output + "/libs\", "))) + ;; Adding X11Extras to target_link_libraries of widgetboxmodel plugin + (substitute* '("plugins/widgetboxmodel/CMakeLists.txt") + (("COMPONENTS Widgets") + "COMPONENTS Widgets X11Extras")) + (substitute* '("plugins/widgetboxmodel/CMakeLists.txt") + (("Qt5::Widgets") + "Qt5::Widgets Qt5::X11Extras X11")) + ;; Adding X11Extras to target_link_libraries of qmlboxmodel plugin + (substitute* '("plugins/qmlboxmodel/CMakeLists.txt") + (("COMPONENTS Widgets") + "COMPONENTS Widgets X11Extras")) + (substitute* '("plugins/qmlboxmodel/CMakeLists.txt") + (("Qt5::Widgets") + "Qt5::Widgets Qt5::X11Extras X11")) + #t))))) + (native-inputs `(("libx11" ,libx11) + ("muparser" ,muparser) + ("pkg-config" ,pkg-config) + ("python3" ,python) + ("qtbase" ,qtbase-5) + ("qtcharts" ,qtcharts) + ("qtdeclarative" ,qtdeclarative-5) + ("qtsvg" ,qtsvg-5) + ("qtx11extras" ,qtx11extras))) (home-page "https://albertlauncher.github.io/") (synopsis "Albert is a unified and efficient access to your machine.") - (description "Albert is a desktop agnostic launcher. Its goals are usability and beauty, performance and extensibility. It is written in C++ and based on the Qt framework.") + (description + "Albert is a desktop agnostic launcher. Its goals are usability and beauty, performance and extensibility. It is written in C++ and based on the Qt framework.") (license license:gpl3+))) - (define-public px-file-archiver (package (inherit lxqt-archiver) (name "px-file-archiver") (version "0.5.0") (source - (origin - (method git-fetch) - (uri (git-reference - (url (string-append "https://github.com/lxqt/lxqt-archiver.git")) - (commit version))) - (file-name (git-file-name "lxqt-archiver" version)) - (sha256 - (base32 "0qz3j0qby78ngck60rv7kgwygya8cr1v4kn575wrsg3w287v33qb")))) + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/lxqt/lxqt-archiver.git")) + (commit version))) + (file-name (git-file-name "lxqt-archiver" version)) + (sha256 + (base32 "0qz3j0qby78ngck60rv7kgwygya8cr1v4kn575wrsg3w287v33qb")))) (arguments - '(#:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-app-name - (lambda _ - (substitute* (find-files "src/translations" "\\.desktop.yaml") - (("LXQt File Archiver") "File Archiver")) - #t))))))) - + '(#:tests? #f + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-app-name + (lambda _ + (substitute* (find-files "src/translations" + "\\.desktop.yaml") + (("LXQt File Archiver") + "File Archiver")) #t))))))) (define-public px-image-viewer (package - (inherit qimgv) - (name "px-image-viewer") - (arguments - '(#:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-menu-item - (lambda _ - (substitute* '("qimgv/distrib/qimgv.desktop") - (("Name=qimgv") "Name=Pictures")) - #t))))))) + (inherit qimgv) + (name "px-image-viewer") + (arguments + '(#:tests? #f + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-menu-item + (lambda _ + (substitute* '("qimgv/distrib/qimgv.desktop") + (("Name=qimgv") + "Name=Pictures")) #t))))))) (define-public px-terminal (package (inherit qterminal) (name "px-terminal") (arguments - '(#:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-menu-item - (lambda _ - (substitute* (find-files "src/translations" "\\.desktop.yaml") - (("QTerminal") "Terminal")) - (substitute* (find-files "src/translations" "\\.desktop.yaml") - (("Qterminal") "Terminal")) - (substitute* '("CMakeLists.txt") - (("qterminal-drop.desktop.in") "")) - #t))))))) + '(#:tests? #f + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-menu-item + (lambda _ + (substitute* (find-files "src/translations" + "\\.desktop.yaml") + (("QTerminal") + "Terminal")) + (substitute* (find-files "src/translations" + "\\.desktop.yaml") + (("Qterminal") + "Terminal")) + (substitute* '("CMakeLists.txt") + (("qterminal-drop.desktop.in") + "")) #t))))))) (define-public qlipper (package (name "qlipper") (version "5.1.2") (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/pvanek/qlipper/archive/" version ".tar.gz")) - (sha256 - (base32 - "0vbhiyn56qwlssavim02kp0y5rxj6gdffchyigkhpg8qza64afch")))) + (origin + (method url-fetch) + (uri (string-append "https://github.com/pvanek/qlipper/archive/" + version ".tar.gz")) + (sha256 + (base32 "0vbhiyn56qwlssavim02kp0y5rxj6gdffchyigkhpg8qza64afch")))) (build-system cmake-build-system) (arguments - `(#:tests? #f)) - (native-inputs - (list qtbase-5 qttools-5)) + `(#:tests? #f)) + (native-inputs (list qtbase-5 qttools-5)) (home-page "https://github.com/pvanek/qlipper") (synopsis "Lightweight and cross-platform clipboard history applet.") (description "Lightweight and cross-platform clipboard history applet.") @@ -217,20 +226,20 @@ (name "cpputilities") (version "5.22.0") (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/Martchus/cpp-utilities/archive/refs/tags/v" version ".tar.gz")) - (sha256 - (base32 - "18mbzw8w0a4l5r0w1fr200m4v8ww65r838618z19v1ymz6aahs7a")))) + (origin + (method url-fetch) + (uri (string-append + "https://github.com/Martchus/cpp-utilities/archive/refs/tags/v" + version ".tar.gz")) + (sha256 + (base32 "18mbzw8w0a4l5r0w1fr200m4v8ww65r838618z19v1ymz6aahs7a")))) (build-system cmake-build-system) - (inputs - `(("gcc" ,gcc-11))) + (inputs `(("gcc" ,gcc-11))) (arguments - `(#:tests? #f - #:configure-flags '("-DCMAKE_VERBOSE_MAKEFILE=ON" "-DBUILD_VIRTUALBOX=OFF" "-DCMAKE_INSTALL_LIBDIR=libs") - )) + `(#:tests? #f + #:configure-flags '("-DCMAKE_VERBOSE_MAKEFILE=ON" + "-DBUILD_VIRTUALBOX=OFF" + "-DCMAKE_INSTALL_LIBDIR=libs"))) (home-page "https://github.com/Martchus/cpp-utilities/") (synopsis "Useful C++ classes and routines") (description "Useful C++ classes and routines such as @@ -242,72 +251,82 @@ argument parser, IO and conversion utilities.") (name "qtutilities") (version "6.12.0") (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/Martchus/qtutilities/archive/refs/tags/v" version ".tar.gz")) - (sha256 - (base32 - "0b58i66hhfg18d9bzbkzx8m34x070af5k3dankz5q69dr1lbrf6k")))) + (origin + (method url-fetch) + (uri (string-append + "https://github.com/Martchus/qtutilities/archive/refs/tags/v" + version ".tar.gz")) + (sha256 + (base32 "0b58i66hhfg18d9bzbkzx8m34x070af5k3dankz5q69dr1lbrf6k")))) (build-system cmake-build-system) - (native-inputs - (list cpputilities qtbase-5 qttools-5)) + (native-inputs (list cpputilities qtbase-5 qttools-5)) (arguments - `(#:tests? #f - )) + `(#:tests? #f)) (home-page "https://github.com/Martchus/qtutilities") (synopsis "Common Qt related C++ classes and routines") (description "Common Qt related C++ classes and routines") (license license:gpl2+))) (define-public fork-awesome - (package - (name "fork-awesome") + (package + (name "fork-awesome") (version "1.2.0") (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/ForkAwesome/Fork-Awesome/archive/refs/tags/" version ".tar.gz")) - (sha256 - (base32 - "1cxxbyklk139cj7hw9jiq51cmmqgn74z8ysl9i0y017jj7qsbyr3")))) - (build-system copy-build-system) - (arguments - '(#:install-plan - '(("fonts" "share/") - ("src" "share/")))) - (home-page "https://github.com/ForkAwesome/Fork-Awesome") - (synopsis "A fork of the iconic font and CSS toolkit ") - (description "Fork Awesome is a suite of 796 pictographic and + (origin + (method url-fetch) + (uri (string-append + "https://github.com/ForkAwesome/Fork-Awesome/archive/refs/tags/" + version ".tar.gz")) + (sha256 + (base32 "1cxxbyklk139cj7hw9jiq51cmmqgn74z8ysl9i0y017jj7qsbyr3")))) + (build-system copy-build-system) + (arguments + '(#:install-plan '(("fonts" "share/") + ("src" "share/")))) + (home-page "https://github.com/ForkAwesome/Fork-Awesome") + (synopsis "A fork of the iconic font and CSS toolkit ") + (description + "Fork Awesome is a suite of 796 pictographic and brand icons for easy, scalable vector graphics on websites and beyond.") - (license license:expat))) + (license license:expat))) (define-public qtforkawesome (package (name "qtforkawesome") (version "0.1.0") (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/Martchus/qtforkawesome/archive/refs/tags/v" version ".tar.gz")) - (sha256 - (base32 - "0pj4w93vrsmgqlgihwz6s2jdazmfsdw3lxns7wk9908l4ilcqw9d")))) + (origin + (method url-fetch) + (uri (string-append + "https://github.com/Martchus/qtforkawesome/archive/refs/tags/v" + version ".tar.gz")) + (sha256 + (base32 "0pj4w93vrsmgqlgihwz6s2jdazmfsdw3lxns7wk9908l4ilcqw9d")))) (build-system cmake-build-system) - (native-inputs - (list gcc-11 qtutilities cpputilities qtbase-5 qtquickcontrols-5 qtquickcontrols2-5 qtdeclarative-5 perl perl-yaml fork-awesome)) + (native-inputs (list gcc-11 + qtutilities + cpputilities + qtbase-5 + qtquickcontrols-5 + qtquickcontrols2-5 + qtdeclarative-5 + perl + perl-yaml + fork-awesome)) (arguments - `(#:tests? #f - #:configure-flags - ,#~(list (string-append "-DFORK_AWESOME_FONT_FILE=" - #$(this-package-native-input "fork-awesome") "/share/fonts/forkawesome-webfont.woff2") - (string-append "-DFORK_AWESOME_ICON_DEFINITIONS=" - #$(this-package-native-input "fork-awesome") "/share/src/icons/icons.yml")))) + `(#:tests? #f + #:configure-flags ,#~(list (string-append "-DFORK_AWESOME_FONT_FILE=" + #$(this-package-native-input "fork-awesome") + "/share/fonts/forkawesome-webfont.woff2") + (string-append + "-DFORK_AWESOME_ICON_DEFINITIONS=" + #$(this-package-native-input "fork-awesome") + "/share/src/icons/icons.yml")))) (home-page "https://github.com/Martchus/qtforkawesome/") - (synopsis "Useful C++ classes and routines such as argument parser, IO and conversion utilities.") - (description "Useful C++ classes and routines such as argument parser, IO and conversion utilities.") + (synopsis + "Useful C++ classes and routines such as argument parser, IO and conversion utilities.") + (description + "Useful C++ classes and routines such as argument parser, IO and conversion utilities.") (license license:gpl2+))) (define-public qxkb @@ -315,22 +334,19 @@ brand icons for easy, scalable vector graphics on websites and beyond.") (name "qxkb") (version "0.5.2") (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/thegala/qxkb/archive/refs/tags/" name "-" version ".tar.gz")) - (sha256 - (base32 - "1nprswfdnqmy6xs6pdkzy6c3xkzh79zifdvy4vpw4l41gnqrl94s")))) + (origin + (method url-fetch) + (uri (string-append + "https://github.com/thegala/qxkb/archive/refs/tags/" name "-" + version ".tar.gz")) + (sha256 + (base32 "1nprswfdnqmy6xs6pdkzy6c3xkzh79zifdvy4vpw4l41gnqrl94s")))) (build-system qt-build-system) - (inputs - (list libxkbfile - qtbase-5 - qtsvg-5 - qtx11extras)) - (native-inputs - (list qttools-5)) - (arguments (list #:tests? #f)) ; no upstream tests + (inputs (list libxkbfile qtbase-5 qtsvg-5 qtx11extras)) + (native-inputs (list qttools-5)) + (arguments + (list + #:tests? #f)) ;no upstream tests (home-page "https://github.com/thegala/qxkb") (synopsis "Keyboard layout switcher") (description "Keyboard layout switcher") @@ -341,43 +357,40 @@ brand icons for easy, scalable vector graphics on websites and beyond.") (name "syncthingtray") (version "1.4.1") (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/Martchus/syncthingtray/archive/refs/tags/v" version ".tar.gz")) - (sha256 - (base32 - "0cyimd018bknvip6jxz83w0va05kgfcix53jryqdka665p4048ba")))) + (origin + (method url-fetch) + (uri (string-append + "https://github.com/Martchus/syncthingtray/archive/refs/tags/v" + version ".tar.gz")) + (sha256 + (base32 "0cyimd018bknvip6jxz83w0va05kgfcix53jryqdka665p4048ba")))) (build-system cmake-build-system) (arguments `(#:tests? #f - #:phases - (modify-phases %standard-phases - (replace 'build - (lambda _ - (invoke "make" "-j" "1") - #t)) - (add-after 'install 'wrap - ;; The program fails to find the QtWebEngineProcess program, - ;; so we set QTWEBENGINEPROCESS_PATH to help it. - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") "/bin")) - (qtwebengineprocess (string-append - (assoc-ref inputs "qtwebengine") - "/lib/qt5/libexec/QtWebEngineProcess"))) - (for-each (lambda (program) - (wrap-program program - `("QTWEBENGINEPROCESS_PATH" = - (,qtwebengineprocess)))) - (find-files bin ".*"))) - #t))))) - (native-inputs - (list extra-cmake-modules qttools-5 gcc-11)) - (inputs `( - ("qtbase" ,qtbase-5) + #:phases (modify-phases %standard-phases + (replace 'build + (lambda _ + (invoke "make" "-j" "1") #t)) + (add-after 'install 'wrap + ;; The program fails to find the QtWebEngineProcess program, + ;; so we set QTWEBENGINEPROCESS_PATH to help it. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") + "/bin")) + (qtwebengineprocess (string-append (assoc-ref + inputs + "qtwebengine") + "/lib/qt5/libexec/QtWebEngineProcess"))) + (for-each (lambda (program) + (wrap-program program + `("QTWEBENGINEPROCESS_PATH" = + (,qtwebengineprocess)))) + (find-files bin ".*"))) #t))))) + (native-inputs (list extra-cmake-modules qttools-5 gcc-11)) + (inputs `(("qtbase" ,qtbase-5) ("qtquickcontrols2" ,qtquickcontrols2-5) ("qtutilities" ,qtutilities) - ("boost", boost) + ("boost" ,boost) ("gcc" ,gcc-11) ("qtdeclarative" ,qtdeclarative-5) ("qtsvg" ,qtsvg-5) @@ -401,11 +414,10 @@ brand icons for easy, scalable vector graphics on websites and beyond.") (name "px-about") (version "1.2.0") (source - (origin - (method url-fetch) - (uri (string-append - "https://source.pantherx.org/" name"_" version ".tgz")) - (sha256 - (base32 - "12cnydcw8rhbwh21j8ayj2x47nvr5zicnqfp6r13dapy1nss5rd4")))))) + (origin + (method url-fetch) + (uri (string-append "https://source.pantherx.org/" name "_" version + ".tgz")) + (sha256 + (base32 "12cnydcw8rhbwh21j8ayj2x47nvr5zicnqfp6r13dapy1nss5rd4")))))) |