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: Id2b7f6e44e507e306e6ccd2baaf3becd8c812c22master
parent
f3fee8f73e
commit
482b30d426
|
@ -81,55 +81,70 @@
|
||||||
"0mxrh0z9x4r4bli25g746n66adwnf3r42lzq0yssc50v9y7fc1a1"))))
|
"0mxrh0z9x4r4bli25g746n66adwnf3r42lzq0yssc50v9y7fc1a1"))))
|
||||||
(build-system qt-build-system)
|
(build-system qt-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list extra-cmake-modules pkg-config qttools-5))
|
(list extra-cmake-modules pkg-config qttools))
|
||||||
(inputs
|
(inputs
|
||||||
(list elogind
|
(list elogind
|
||||||
glib
|
glib
|
||||||
libxcb
|
libxcb
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
linux-pam
|
linux-pam
|
||||||
qtbase-5
|
qtdeclarative
|
||||||
qtdeclarative-5
|
qtsvg
|
||||||
;; 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
|
|
||||||
shadow
|
shadow
|
||||||
wayland))
|
wayland
|
||||||
|
qtwayland
|
||||||
|
qtbase
|
||||||
|
xsetroot))
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(let* ((qtbase (this-package-input "qtbase"))
|
||||||
#:configure-flags
|
(qt6? (string= "6" (version-major (package-version qtbase)))))
|
||||||
#~(list
|
(list
|
||||||
"-DENABLE_WAYLAND=ON"
|
#:qtbase qtbase
|
||||||
"-DENABLE_PAM=ON"
|
#:configure-flags
|
||||||
;; PAM is configured by pam service.
|
#~(list
|
||||||
"-DINSTALL_PAM_CONFIGURATION=OFF"
|
#$@(if qt6?
|
||||||
;; Both flags are required for elogind support.
|
#~("-DBUILD_WITH_QT6=ON")
|
||||||
"-DNO_SYSTEMD=ON"
|
#~())
|
||||||
"-DUSE_ELOGIND=ON"
|
"-DENABLE_WAYLAND=ON"
|
||||||
"-DCONFIG_FILE=/etc/sddm.conf"
|
"-DENABLE_PAM=ON"
|
||||||
;; Set path to /etc/login.defs.
|
;; PAM is configured by pam service.
|
||||||
;; An alternative would be to use -DUID_MIN and -DUID_MAX.
|
"-DINSTALL_PAM_CONFIGURATION=OFF"
|
||||||
(string-append "-DLOGIN_DEFS_PATH="
|
;; Both flags are required for elogind support.
|
||||||
#$(this-package-input "shadow")
|
"-DNO_SYSTEMD=ON"
|
||||||
"/etc/login.defs")
|
"-DUSE_ELOGIND=ON"
|
||||||
(string-append "-DCMAKE_CXX_FLAGS=-I"
|
"-DCONFIG_FILE=/etc/sddm.conf"
|
||||||
#$(this-package-input
|
;; Set path to /etc/login.defs.
|
||||||
"qtdeclarative") "/include/qt5")
|
;; An alternative would be to use -DUID_MIN and -DUID_MAX.
|
||||||
(string-append "-DQT_IMPORTS_DIR="
|
(string-append "-DLOGIN_DEFS_PATH="
|
||||||
#$output "/lib/qt5/qml")
|
#$(this-package-input "shadow")
|
||||||
(string-append "-DCMAKE_INSTALL_SYSCONFDIR="
|
"/etc/login.defs")
|
||||||
#$output "/etc"))
|
(string-append
|
||||||
#:phases
|
"-DCMAKE_CXX_FLAGS=-I"
|
||||||
#~(modify-phases %standard-phases
|
#$(this-package-input "qtdeclarative") "/include/qt" #$(if qt6? "6" "5"))
|
||||||
(add-after 'unpack 'embed-loginctl-reference
|
(string-append "-DQT_IMPORTS_DIR="
|
||||||
(lambda _
|
#$output "/lib/qt" #$(if qt6? "6" "5") "/qml")
|
||||||
(substitute* "CMakeLists.txt"
|
(string-append "-DCMAKE_INSTALL_SYSCONFDIR="
|
||||||
(("/usr/bin/loginctl")
|
#$output "/etc"))
|
||||||
(which "loginctl"))))))))
|
#: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")
|
(synopsis "QML based X11 and Wayland display manager")
|
||||||
(description "SDDM is a display manager for X11 and Wayland aiming to be
|
(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
|
fast, simple and beautiful. SDDM is themeable and puts no restrictions on the
|
||||||
|
|
Reference in New Issue