aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/display-managers.scm
diff options
context:
space:
mode:
authorZheng Junjie <zhengjunjie@iscas.ac.cn>2024-05-07 10:14:10 +0800
committerZheng Junjie <zhengjunjie@iscas.ac.cn>2024-07-18 10:45:19 +0800
commit482b30d426b53e7fdef14007ab8ba52b9b1d379c (patch)
treec4dbc212947f06ec3b9d04c15eb42111c9a81a36 /gnu/packages/display-managers.scm
parentf3fee8f73e005219da1546b1732c166a49c21b08 (diff)
downloadguix-482b30d426b53e7fdef14007ab8ba52b9b1d379c.tar
guix-482b30d426b53e7fdef14007ab8ba52b9b1d379c.tar.gz
gnu: sddm: Enable qt6.
* gnu/packages/display-managers.scm (sddm): Enable qt6. [native-inputs]: Use qttools replace qttools-5. [inputs]: Add xsetroot, qtwayland. Remove qtgraphicaleffects, qtquickcontrols-5, qtquickcontrols2-5. Use qtbase, qtsvg and qtdeclarative replace qtbase-5, qtsvg-5 and qtdeclarative-5. [arguments]<#:configure-flags>: When input qtbase is qt6, Add -DBUILD_WITH_QT6=ON and adjust CMAKE_CXX_FLAGS and QT_IMPORTS_DIR. <#:phases>: Add embed-xsetroot-reference. When When input qtbase is qt6, Add fix-QML_IMPORT_PATH phase. Change-Id: Id2b7f6e44e507e306e6ccd2baaf3becd8c812c22
Diffstat (limited to 'gnu/packages/display-managers.scm')
-rw-r--r--gnu/packages/display-managers.scm97
1 files changed, 56 insertions, 41 deletions
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 6a6437ff0c..b0c0d48621 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -81,55 +81,70 @@
"0mxrh0z9x4r4bli25g746n66adwnf3r42lzq0yssc50v9y7fc1a1"))))
(build-system qt-build-system)
(native-inputs
- (list extra-cmake-modules pkg-config qttools-5))
+ (list extra-cmake-modules pkg-config qttools))
(inputs
(list elogind
glib
libxcb
libxkbcommon
linux-pam
- qtbase-5
- qtdeclarative-5
- ;; Some user-defined themes use QtQuick components internally. Adding
- ;; QtQuick & co. here; they end up in QML2_IMPORT_PATH thanks to
- ;; 'wrap-qt-program'.
- qtgraphicaleffects
- qtquickcontrols-5
- qtquickcontrols2-5
- qtsvg-5
+ qtdeclarative
+ qtsvg
shadow
- wayland))
+ wayland
+ qtwayland
+ qtbase
+ xsetroot))
(arguments
- (list
- #:configure-flags
- #~(list
- "-DENABLE_WAYLAND=ON"
- "-DENABLE_PAM=ON"
- ;; PAM is configured by pam service.
- "-DINSTALL_PAM_CONFIGURATION=OFF"
- ;; Both flags are required for elogind support.
- "-DNO_SYSTEMD=ON"
- "-DUSE_ELOGIND=ON"
- "-DCONFIG_FILE=/etc/sddm.conf"
- ;; Set path to /etc/login.defs.
- ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
- (string-append "-DLOGIN_DEFS_PATH="
- #$(this-package-input "shadow")
- "/etc/login.defs")
- (string-append "-DCMAKE_CXX_FLAGS=-I"
- #$(this-package-input
- "qtdeclarative") "/include/qt5")
- (string-append "-DQT_IMPORTS_DIR="
- #$output "/lib/qt5/qml")
- (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
- #$output "/etc"))
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'embed-loginctl-reference
- (lambda _
- (substitute* "CMakeLists.txt"
- (("/usr/bin/loginctl")
- (which "loginctl"))))))))
+ (let* ((qtbase (this-package-input "qtbase"))
+ (qt6? (string= "6" (version-major (package-version qtbase)))))
+ (list
+ #:qtbase qtbase
+ #:configure-flags
+ #~(list
+ #$@(if qt6?
+ #~("-DBUILD_WITH_QT6=ON")
+ #~())
+ "-DENABLE_WAYLAND=ON"
+ "-DENABLE_PAM=ON"
+ ;; PAM is configured by pam service.
+ "-DINSTALL_PAM_CONFIGURATION=OFF"
+ ;; Both flags are required for elogind support.
+ "-DNO_SYSTEMD=ON"
+ "-DUSE_ELOGIND=ON"
+ "-DCONFIG_FILE=/etc/sddm.conf"
+ ;; Set path to /etc/login.defs.
+ ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
+ (string-append "-DLOGIN_DEFS_PATH="
+ #$(this-package-input "shadow")
+ "/etc/login.defs")
+ (string-append
+ "-DCMAKE_CXX_FLAGS=-I"
+ #$(this-package-input "qtdeclarative") "/include/qt" #$(if qt6? "6" "5"))
+ (string-append "-DQT_IMPORTS_DIR="
+ #$output "/lib/qt" #$(if qt6? "6" "5") "/qml")
+ (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
+ #$output "/etc"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'embed-loginctl-reference
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("/usr/bin/loginctl")
+ (which "loginctl")))))
+ (add-after 'unpack 'embed-xsetroot-reference
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("src/daemon/XorgDisplayServer.cpp"
+ "src/helper/xorguserhelper.cpp")
+ (("xsetroot")
+ (search-input-file inputs "/bin/xsetroot")))))
+ #$@(if qt6?
+ #~((add-after 'unpack 'fix-QML_IMPORT_PATH
+ (lambda _
+ (substitute* "src/daemon/Greeter.cpp"
+ (("QML2_IMPORT_PATH")
+ "QML_IMPORT_PATH")))))
+ #~())))))
(synopsis "QML based X11 and Wayland display manager")
(description "SDDM is a display manager for X11 and Wayland aiming to be
fast, simple and beautiful. SDDM is themeable and puts no restrictions on the