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>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages display-managers)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system cmake)
31 #:use-module (guix build-system qt)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix packages)
34 #:use-module (guix utils)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages admin)
37 #:use-module (gnu packages fontutils)
38 #:use-module (gnu packages freedesktop)
39 #:use-module (gnu packages gl)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages gnupg)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages kde-frameworks)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages python)
49 #:use-module (gnu packages qt)
50 #:use-module (gnu packages xdisorg)
51 #:use-module (gnu packages xfce)
52 #:use-module (gnu packages xorg))
61 "https://github.com/sddm/sddm"
62 "/releases/download/v" version "/"
63 "sddm-" version ".tar.xz"))
66 "0nilrhwlyvkngjgxfc08n73c16azgmw80pvx0a78xqww9y3hv4xh"))))
67 (build-system qt-build-system)
69 `(("extra-cmake-modules" ,extra-cmake-modules)
70 ("pkg-config" ,pkg-config)
71 ("qttools" ,qttools)))
73 `(("elogind" ,elogind)
76 ("libxkbcommon" ,libxkbcommon)
77 ("linux-pam" ,linux-pam)
79 ("qtdeclarative" ,qtdeclarative)
81 ;; Some user-defined themes use QtQuick components internally. Adding
82 ;; QtQuick & co. here; they end up in QML2_IMPORT_PATH thanks to
84 ("qtgraphicaleffects" ,qtgraphicaleffects)
85 ("qtquickcontrols" ,qtquickcontrols)
86 ("qtquickcontrols2" ,qtquickcontrols2)
90 ("wayland" ,wayland)))
94 ;; This option currently does nothing, but will presumably be enabled
95 ;; if/when <https://github.com/sddm/sddm/pull/616> is merged.
98 ;; Both flags are required for elogind support.
99 "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
100 "-DCONFIG_FILE=/etc/sddm.conf"
101 ;; Set path to /etc/login.defs.
102 ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
103 (string-append "-DLOGIN_DEFS_PATH="
104 (assoc-ref %build-inputs "shadow")
106 (string-append "-DQT_IMPORTS_DIR="
107 (assoc-ref %outputs "out") "/lib/qt5/qml")
108 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
109 (assoc-ref %outputs "out") "/etc"))
111 (modify-phases %standard-phases
112 (add-after 'unpack 'embed-loginctl-reference
114 (substitute* "CMakeLists.txt"
115 (("/usr/bin/loginctl") (which "loginctl")))
117 (synopsis "QML based X11 and Wayland display manager")
118 (description "SDDM is a display manager for X11 and Wayland aiming to be
119 fast, simple and beautiful. SDDM is themeable and puts no restrictions on the
120 user interface design. It uses QtQuick which gives the designer the ability to
121 create smooth, animated user interfaces.")
122 (home-page "https://github.com/sddm/sddm")
123 ;; QML files are MIT licensed and images are CC BY 3.0.
124 (license (list license:gpl2+ license:expat license:cc-by3.0))))
126 (define-public lightdm
133 "https://github.com/CanonicalLtd/lightdm/releases/download/"
134 version "/lightdm-" version ".tar.xz"))
137 "158zb2d0v1309a8v19hh32y4yj3v6yg4yg6m0l7v59d3a2b7f651"))))
138 (build-system gnu-build-system)
140 '(#:parallel-tests? #f ; fails when run in parallel
142 (list "--localstatedir=/var")
144 (modify-phases %standard-phases
145 (add-after 'unpack 'fix-paths
147 (substitute* "src/shared-data-manager.c"
148 (("/bin/rm") (which "rm")))
149 (substitute* '("data/users.conf"
150 "common/user-list.c")
151 (("/bin/false") (which "false"))
152 (("/usr/sbin/nologin") (which "nologin")))
153 (substitute* "src/seat.c"
154 (("/bin/sh") (which "sh")))
156 (add-before 'check 'pre-check
157 ;; Run test-suite under a dbus session.
158 (lambda* (#:key inputs #:allow-other-keys)
159 (wrap-program "tests/src/test-python-greeter"
160 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
161 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
163 ;; Avoid printing locale warnings, which trip up the text
169 ("linux-pam" ,linux-pam)
170 ("shadow" ,shadow) ;for sbin/nologin
171 ("libgcrypt" ,libgcrypt)
174 `(("gobject-introspection" ,gobject-introspection)
175 ("pkg-config" ,pkg-config)
177 ("intltool" ,intltool)
178 ("vala" ,vala) ;for Vala bindings
182 ("python-pygobject" ,python2-pygobject)))
183 ;; Required by liblightdm-gobject-1.pc.
187 ("libxklavier" ,libxklavier)))
188 (home-page "https://www.freedesktop.org/wiki/Software/LightDM/")
189 (synopsis "Lightweight display manager")
190 (description "The Light Display Manager (LightDM) is a cross-desktop
191 display manager which supports different greeters.")
192 (license license:gpl3+)))
194 (define-public lightdm-gtk-greeter
196 (name "lightdm-gtk-greeter")
201 "https://launchpad.net/lightdm-gtk-greeter/"
202 (version-major+minor version) "/" version
203 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
206 "1g7wc3d3vqfa7mrdhx1w9ywydgjbffla6rbrxq9k3sc62br97qms"))))
207 (build-system gnu-build-system)
210 (list (string-append "--enable-at-spi-command="
211 (assoc-ref %build-inputs "at-spi2-core")
212 "/libexec/at-spi-bus-launcher"))
214 (modify-phases %standard-phases
215 (add-after 'install 'fix-.desktop-file
216 (lambda* (#:key outputs #:allow-other-keys)
217 (let ((out (assoc-ref outputs "out")))
218 (substitute* (string-append
219 out "/share/xgreeters/lightdm-gtk-greeter.desktop")
220 (("Exec=lightdm-gtk-greeter")
221 (string-append "Exec=" out "/sbin/lightdm-gtk-greeter")))
223 (add-after 'fix-.desktop-file 'wrap-program
224 ;; Mimic glib-or-gtk build system
225 ;; which doesn't wrap files in /sbin
226 (lambda* (#:key outputs inputs #:allow-other-keys)
227 (let ((gtk (assoc-ref inputs "gtk+")))
228 (wrap-program (string-append (assoc-ref outputs "out")
229 "/sbin/lightdm-gtk-greeter")
230 `("XDG_DATA_DIRS" ":" prefix
231 ,(cons "/run/current-system/profile/share"
233 (string-append (assoc-ref inputs pkg) "/share"))
234 '("gtk+" "shared-mime-info" "glib"))))
235 `("GTK_PATH" ":" prefix (,gtk))
236 `("GIO_EXTRA_MODULES" ":" prefix (,gtk))))
240 ("intltool" ,intltool)
241 ("pkg-config" ,pkg-config)))
243 `(("lightdm" ,lightdm)
244 ("shared-mime-info" ,shared-mime-info)
245 ("at-spi2-core" ,at-spi2-core)
247 (synopsis "GTK+ greeter for LightDM")
248 (home-page "https://launchpad.net/lightdm-gtk-greeter")
249 (description "This package provides a LightDM greeter implementation using
250 GTK+, lets you select a desktop session and log in to it.")
251 (license license:gpl3+)))
259 ;; Used to be available from download.berlios.de.
261 "mirror://sourceforge/slim.berlios/slim-"
264 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
265 (patches (search-patches "slim-config.patch"
270 "slim-display.patch"))))
271 (build-system cmake-build-system)
272 (inputs `(("linux-pam" ,linux-pam)
274 ("libjpeg" ,libjpeg-turbo)
275 ("freeglut" ,freeglut)
276 ("libxrandr" ,libxrandr)
277 ("libxrender" ,libxrender)
278 ("freetype" ,freetype)
279 ("fontconfig" ,fontconfig)
285 `(("pkg-config" ,pkg-config)))
288 (modify-phases %standard-phases
289 (add-before 'configure 'set-new-etc-location
291 (substitute* "CMakeLists.txt"
293 (string-append (assoc-ref %outputs "out") "/etc"))
294 (("install.*systemd.*")
295 ;; The build system's logic here is: if "Linux", then
296 ;; "systemd". Strip that.
299 #:configure-flags '("-DUSE_PAM=yes"
300 "-DUSE_CONSOLEKIT=no")
303 ;; This used to be at <http://slim.berlios.de/>.
304 (home-page "https://sourceforge.net/projects/slim.berlios/")
305 (synopsis "Desktop-independent graphical login manager for X11")
307 "SLiM is a Desktop-independent graphical login manager for X11, derived
308 from Login.app. It aims to be light and simple, although completely
309 configurable through themes and an option file; is suitable for machines on
310 which remote login functionalities are not needed.
312 Features included: PNG and XFT support for alpha transparency and antialiased
313 fonts, External themes support, Configurable runtime options: X server --
314 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
315 input control, Can load predefined user at startup, Configurable welcome /
316 shutdown messages, Random theme selection.")
317 (license license:gpl2)))