1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Joshua Grant <tadni@riseup.net>
3 ;;; Copyright © 2014, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Sou Bunnbu <iyzsong@gmail.com>
7 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
8 ;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2020 L p R n d n <guix@lprndn.info>
10 ;;; Copyright © 2020 Fredrik Salomonsson <plattfot@gmail.com>
11 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
12 ;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages display-managers)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system qt)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system trivial)
38 #:use-module (guix packages)
39 #:use-module (guix utils)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages admin)
42 #:use-module (gnu packages fontutils)
43 #:use-module (gnu packages freedesktop)
44 #:use-module (gnu packages gl)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gnupg)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages image)
50 #:use-module (gnu packages kde-frameworks)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages qt)
55 #:use-module (gnu packages xdisorg)
56 #:use-module (gnu packages xfce)
57 #:use-module (gnu packages xorg))
66 "https://github.com/sddm/sddm"
67 "/releases/download/v" version "/"
68 "sddm-" version ".tar.xz"))
71 "0hcdysw8ibr66vk8i7v56l0v5ijvhlq67v4460mc2xf2910g2m72"))))
72 (build-system qt-build-system)
74 `(("extra-cmake-modules" ,extra-cmake-modules)
75 ("pkg-config" ,pkg-config)
76 ("qttools" ,qttools)))
78 `(("elogind" ,elogind)
81 ("libxkbcommon" ,libxkbcommon)
82 ("linux-pam" ,linux-pam)
84 ("qtdeclarative" ,qtdeclarative)
86 ;; Some user-defined themes use QtQuick components internally. Adding
87 ;; QtQuick & co. here; they end up in QML2_IMPORT_PATH thanks to
89 ("qtgraphicaleffects" ,qtgraphicaleffects)
90 ("qtquickcontrols" ,qtquickcontrols)
91 ("qtquickcontrols2" ,qtquickcontrols2)
95 ("wayland" ,wayland)))
99 ;; This option currently does nothing, but will presumably be enabled
100 ;; if/when <https://github.com/sddm/sddm/pull/616> is merged.
101 "-DENABLE_WAYLAND=ON"
103 ;; Both flags are required for elogind support.
104 "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
105 "-DCONFIG_FILE=/etc/sddm.conf"
106 ;; Set path to /etc/login.defs.
107 ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
108 (string-append "-DLOGIN_DEFS_PATH="
109 (assoc-ref %build-inputs "shadow")
111 (string-append "-DQT_IMPORTS_DIR="
112 (assoc-ref %outputs "out") "/lib/qt5/qml")
113 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
114 (assoc-ref %outputs "out") "/etc"))
116 (modify-phases %standard-phases
117 (add-after 'unpack 'embed-loginctl-reference
119 (substitute* "CMakeLists.txt"
120 (("/usr/bin/loginctl") (which "loginctl")))
122 (synopsis "QML based X11 and Wayland display manager")
123 (description "SDDM is a display manager for X11 and Wayland aiming to be
124 fast, simple and beautiful. SDDM is themeable and puts no restrictions on the
125 user interface design. It uses QtQuick which gives the designer the ability to
126 create smooth, animated user interfaces.")
127 (home-page "https://github.com/sddm/sddm")
128 ;; QML files are MIT licensed and images are CC BY 3.0.
129 (license (list license:gpl2+ license:expat license:cc-by3.0))))
131 (define-public guix-simplyblack-sddm-theme
133 (name "guix-simplyblack-sddm-theme")
138 (url "https://github.com/plattfot/guix-simplyblack-sddm")
140 (file-name (git-file-name name version))
142 (base32 "1fwny6b0xpjs8ad2b16pyxd27gf0sr0nillmhc2h5k0q7dva21vi"))))
143 (build-system trivial-build-system)
145 `(#:modules ((guix build utils))
148 (use-modules (guix build utils))
149 (let* ((out (assoc-ref %outputs "out"))
150 (sddm-themes (string-append out "/share/sddm/themes")))
151 (mkdir-p sddm-themes)
152 (copy-recursively (assoc-ref %build-inputs "source")
153 (string-append sddm-themes "/guix-simplyblack-sddm"))))))
154 (home-page "https://github.com/plattfot/guix-simplyblack-sddm")
155 (synopsis "Guix based theme for SDDM")
157 "This package provides a simple theme for SDDM, black background with
158 Guix's logo. Based on Arch linux's archlinux-simplyblack theme.")
159 ;; Theme under cc-by-sa3.0, guix logo under license:cc-by-sa4.0
160 (license (list license:cc-by-sa3.0 license:cc-by-sa4.0))))
162 (define-public chili-sddm-theme
164 (name "chili-sddm-theme")
169 (url "https://github.com/MarianArlt/sddm-chili")
171 (file-name (git-file-name name version))
174 "036fxsa7m8ymmp3p40z671z163y6fcsa9a641lrxdrw225ssq5f3"))))
175 (build-system trivial-build-system)
177 `(#:modules ((guix build utils))
180 (use-modules (guix build utils))
181 (let* ((out (assoc-ref %outputs "out"))
182 (sddm-themes (string-append out "/share/sddm/themes")))
183 (mkdir-p sddm-themes)
184 (copy-recursively (assoc-ref %build-inputs "source")
185 (string-append sddm-themes "/chili"))))))
186 (home-page "https://github.com/MarianArlt/sddm-chili")
187 (synopsis "Chili theme for SDDM")
188 (description "Chili reduces all the clutter and leaves you with a clean,
189 easy to use, login interface with a modern yet classy touch.")
190 (license license:gpl3+)))
192 (define-public lightdm
199 "https://github.com/CanonicalLtd/lightdm/releases/download/"
200 version "/lightdm-" version ".tar.xz"))
203 "158zb2d0v1309a8v19hh32y4yj3v6yg4yg6m0l7v59d3a2b7f651"))))
204 (build-system gnu-build-system)
206 '(#:parallel-tests? #f ; fails when run in parallel
208 (list "--localstatedir=/var")
210 (modify-phases %standard-phases
211 (add-after 'unpack 'fix-paths
213 (substitute* "src/shared-data-manager.c"
214 (("/bin/rm") (which "rm")))
215 (substitute* '("data/users.conf"
216 "common/user-list.c")
217 (("/bin/false") (which "false"))
218 (("/usr/sbin/nologin") (which "nologin")))
219 (substitute* "src/seat.c"
220 (("/bin/sh") (which "sh")))
222 (add-before 'check 'pre-check
223 ;; Run test-suite under a dbus session.
224 (lambda* (#:key inputs #:allow-other-keys)
225 (wrap-program "tests/src/test-python-greeter"
226 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
227 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
229 ;; Avoid printing locale warnings, which trip up the text
235 ("linux-pam" ,linux-pam)
236 ("shadow" ,shadow) ;for sbin/nologin
237 ("libgcrypt" ,libgcrypt)
240 `(("gobject-introspection" ,gobject-introspection)
241 ("pkg-config" ,pkg-config)
243 ("intltool" ,intltool)
244 ("vala" ,vala) ;for Vala bindings
248 ("python-pygobject" ,python2-pygobject)))
249 ;; Required by liblightdm-gobject-1.pc.
253 ("libxklavier" ,libxklavier)))
254 (home-page "https://www.freedesktop.org/wiki/Software/LightDM/")
255 (synopsis "Lightweight display manager")
256 (description "The Light Display Manager (LightDM) is a cross-desktop
257 display manager which supports different greeters.")
258 (license license:gpl3+)))
260 (define-public lightdm-gtk-greeter
262 (name "lightdm-gtk-greeter")
267 "https://launchpad.net/lightdm-gtk-greeter/"
268 (version-major+minor version) "/" version
269 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
272 "1g7wc3d3vqfa7mrdhx1w9ywydgjbffla6rbrxq9k3sc62br97qms"))))
273 (build-system gnu-build-system)
276 (list (string-append "--enable-at-spi-command="
277 (assoc-ref %build-inputs "at-spi2-core")
278 "/libexec/at-spi-bus-launcher"))
280 (modify-phases %standard-phases
281 (add-after 'install 'fix-.desktop-file
282 (lambda* (#:key outputs #:allow-other-keys)
283 (let ((out (assoc-ref outputs "out")))
284 (substitute* (string-append
285 out "/share/xgreeters/lightdm-gtk-greeter.desktop")
286 (("Exec=lightdm-gtk-greeter")
287 (string-append "Exec=" out "/sbin/lightdm-gtk-greeter")))
289 (add-after 'fix-.desktop-file 'wrap-program
290 ;; Mimic glib-or-gtk build system
291 ;; which doesn't wrap files in /sbin
292 (lambda* (#:key outputs inputs #:allow-other-keys)
293 (let ((gtk (assoc-ref inputs "gtk+")))
294 (wrap-program (string-append (assoc-ref outputs "out")
295 "/sbin/lightdm-gtk-greeter")
296 `("XDG_DATA_DIRS" ":" prefix
297 ,(cons "/run/current-system/profile/share"
299 (string-append (assoc-ref inputs pkg) "/share"))
300 '("gtk+" "shared-mime-info" "glib"))))
301 `("GTK_PATH" ":" prefix (,gtk))
302 `("GIO_EXTRA_MODULES" ":" prefix (,gtk))))
306 ("intltool" ,intltool)
307 ("pkg-config" ,pkg-config)))
309 `(("lightdm" ,lightdm)
310 ("shared-mime-info" ,shared-mime-info)
311 ("at-spi2-core" ,at-spi2-core)
313 (synopsis "GTK+ greeter for LightDM")
314 (home-page "https://launchpad.net/lightdm-gtk-greeter")
315 (description "This package provides a LightDM greeter implementation using
316 GTK+, lets you select a desktop session and log in to it.")
317 (license license:gpl3+)))
325 ;; Used to be available from download.berlios.de.
327 "mirror://sourceforge/slim.berlios/slim-"
330 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
331 (patches (search-patches "slim-config.patch"
336 "slim-display.patch"))))
337 (build-system cmake-build-system)
338 (inputs `(("linux-pam" ,linux-pam)
340 ("libjpeg" ,libjpeg-turbo)
341 ("freeglut" ,freeglut)
342 ("libxrandr" ,libxrandr)
343 ("libxrender" ,libxrender)
344 ("freetype" ,freetype)
345 ("fontconfig" ,fontconfig)
351 `(("pkg-config" ,pkg-config)))
354 (modify-phases %standard-phases
355 (add-before 'configure 'set-new-etc-location
357 (substitute* "CMakeLists.txt"
359 (string-append (assoc-ref %outputs "out") "/etc"))
360 (("install.*systemd.*")
361 ;; The build system's logic here is: if "Linux", then
362 ;; "systemd". Strip that.
365 #:configure-flags '("-DUSE_PAM=yes"
366 "-DUSE_CONSOLEKIT=no")
369 ;; This used to be at <http://slim.berlios.de/>.
370 (home-page "https://sourceforge.net/projects/slim.berlios/")
371 (synopsis "Desktop-independent graphical login manager for X11")
373 "SLiM is a Desktop-independent graphical login manager for X11, derived
374 from Login.app. It aims to be light and simple, although completely
375 configurable through themes and an option file; is suitable for machines on
376 which remote login functionalities are not needed.
378 Features included: PNG and XFT support for alpha transparency and antialiased
379 fonts, External themes support, Configurable runtime options: X server --
380 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
381 input control, Can load predefined user at startup, Configurable welcome /
382 shutdown messages, Random theme selection.")
383 (license license:gpl2)))