Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / display-managers.scm
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 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages display-managers)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix packages)
32 #:use-module (guix utils)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages admin)
35 #:use-module (gnu packages fontutils)
36 #:use-module (gnu packages freedesktop)
37 #:use-module (gnu packages gl)
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages gnupg)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages image)
43 #:use-module (gnu packages kde-frameworks)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages qt)
48 #:use-module (gnu packages xdisorg)
49 #:use-module (gnu packages xfce)
50 #:use-module (gnu packages xorg))
51
52 (define-public sddm
53 (package
54 (name "sddm")
55 (version "0.18.1")
56 (source (origin
57 (method url-fetch)
58 (uri (string-append
59 "https://github.com/sddm/sddm"
60 "/releases/download/v" version "/"
61 "sddm-" version ".tar.xz"))
62 (sha256
63 (base32
64 "0nilrhwlyvkngjgxfc08n73c16azgmw80pvx0a78xqww9y3hv4xh"))))
65 (build-system cmake-build-system)
66 (native-inputs
67 `(("extra-cmake-modules" ,extra-cmake-modules)
68 ("pkg-config" ,pkg-config)
69 ("qttools" ,qttools)))
70 (inputs
71 `(("elogind" ,elogind)
72 ("glib" ,glib)
73 ("libxcb" ,libxcb)
74 ("libxkbcommon" ,libxkbcommon)
75 ("linux-pam" ,linux-pam)
76 ("qtbase" ,qtbase)
77 ("qtdeclarative" ,qtdeclarative)
78 ("shadow" ,shadow)
79 ("wayland" ,wayland)))
80 (arguments
81 `(#:configure-flags
82 (list
83 ;; This option currently does nothing, but will presumably be enabled
84 ;; if/when <https://github.com/sddm/sddm/pull/616> is merged.
85 "-DENABLE_WAYLAND=ON"
86 "-DENABLE_PAM=ON"
87 ;; Both flags are required for elogind support.
88 "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
89 "-DCONFIG_FILE=/etc/sddm.conf"
90 ;; Set path to /etc/login.defs.
91 ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
92 (string-append "-DLOGIN_DEFS_PATH="
93 (assoc-ref %build-inputs "shadow")
94 "/etc/login.defs")
95 (string-append "-DQT_IMPORTS_DIR="
96 (assoc-ref %outputs "out") "/qml")
97 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
98 (assoc-ref %outputs "out") "/etc"))
99 #:modules ((guix build cmake-build-system)
100 (guix build qt-utils)
101 (guix build utils))
102 #:imported-modules (,@%cmake-build-system-modules
103 (guix build qt-utils))
104 #:phases
105 (modify-phases %standard-phases
106 (add-after 'unpack 'embed-loginctl-reference
107 (lambda _
108 (substitute* "CMakeLists.txt"
109 (("/usr/bin/loginctl") (which "loginctl")))
110 #t))
111 (add-after 'install 'wrap-programs
112 (lambda* (#:key outputs #:allow-other-keys)
113 (let ((out (assoc-ref outputs "out")))
114 (wrap-qt-program out "sddm")
115 (wrap-qt-program out "sddm-greeter")
116 #t))))))
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))))
125
126 (define-public lightdm
127 (package
128 (name "lightdm")
129 (version "1.24.0")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append "https://launchpad.net/lightdm/"
133 (version-major+minor version) "/"
134 version "/+download/lightdm-"
135 version ".tar.xz"))
136 (sha256
137 (base32
138 "18j33bm54i8k7ncxcs69zqi4105s62n58jrydqn3ikrb71s9nl6d"))))
139 (build-system gnu-build-system)
140 (arguments
141 '(#:parallel-tests? #f ; fails when run in parallel
142 #:configure-flags
143 (list "--localstatedir=/var")
144 #:phases
145 (modify-phases %standard-phases
146 (add-after 'unpack 'fix-paths
147 (lambda _
148 (substitute* "src/shared-data-manager.c"
149 (("/bin/rm") (which "rm")))
150 (substitute* '("data/users.conf"
151 "common/user-list.c")
152 (("/bin/false") (which "false"))
153 (("/usr/sbin/nologin") (which "nologin")))
154 (substitute* "src/seat.c"
155 (("/bin/sh") (which "sh")))
156 #t))
157 (add-after 'unpack 'disable-broken-tests
158 (lambda _
159 (substitute* "tests/Makefile.in"
160 (("test-sessions-gobject ") "")
161 ((" test-sessions-python ") " "))
162 #t))
163 (add-before 'check 'pre-check
164 ;; Run test-suite under a dbus session.
165 (lambda* (#:key inputs #:allow-other-keys)
166 (wrap-program "tests/src/test-python-greeter"
167 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
168 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
169
170 ;; Avoid printing locale warnings, which trip up the text
171 ;; matching tests.
172 (unsetenv "LC_ALL")
173 #t)))))
174 (inputs
175 `(("audit" ,audit)
176 ("linux-pam" ,linux-pam)
177 ("shadow" ,shadow) ;for sbin/nologin
178 ("libgcrypt" ,libgcrypt)
179 ("libxcb" ,libxcb)))
180 (native-inputs
181 `(("gobject-introspection" ,gobject-introspection)
182 ("pkg-config" ,pkg-config)
183 ("itstool" ,itstool)
184 ("intltool" ,intltool)
185 ;; For tests
186 ("dbus" ,dbus)
187 ("python" ,python-2)
188 ("python-pygobject" ,python2-pygobject)))
189 ;; Required by liblightdm-gobject-1.pc.
190 (propagated-inputs
191 `(("glib" ,glib)
192 ("libx11" ,libx11)
193 ("libxklavier" ,libxklavier)))
194 (home-page "https://www.freedesktop.org/wiki/Software/LightDM/")
195 (synopsis "Lightweight display manager")
196 (description "The Light Display Manager (LightDM) is a cross-desktop
197 display manager which supports different greeters.")
198 (license license:gpl3+)))
199
200 (define-public lightdm-gtk-greeter
201 (package
202 (name "lightdm-gtk-greeter")
203 (version "2.0.2")
204 (source (origin
205 (method url-fetch)
206 (uri (string-append
207 "https://launchpad.net/lightdm-gtk-greeter/"
208 (version-major+minor version) "/" version
209 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
210 (sha256
211 (base32
212 "1436sdm83xqhxyr1rzqxhsl8if2xmidlvb341xcv6dv83lyxkrlf"))))
213 (build-system gnu-build-system)
214 (native-inputs
215 `(("exo" ,exo)
216 ("intltool" ,intltool)
217 ("pkg-config" ,pkg-config)))
218 (inputs
219 `(("lightdm" ,lightdm)
220 ("gtk+" ,gtk+)))
221 (synopsis "GTK+ greeter for LightDM")
222 (home-page "https://launchpad.net/lightdm-gtk-greeter")
223 (description "This package provides a LightDM greeter implementation using
224 GTK+, lets you select a desktop session and log in to it.")
225 (license license:gpl3+)))
226
227 (define-public slim
228 (package
229 (name "slim")
230 (version "1.3.6")
231 (source (origin
232 (method url-fetch)
233 ;; Used to be available from download.berlios.de.
234 (uri (string-append
235 "mirror://sourceforge/slim.berlios/slim-"
236 version ".tar.gz"))
237 (sha256
238 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
239 (patches (search-patches "slim-config.patch"
240 "slim-reset.patch"
241 "slim-login.patch"
242 "slim-session.patch"
243 "slim-sigusr1.patch"
244 "slim-display.patch"))))
245 (build-system cmake-build-system)
246 (inputs `(("linux-pam" ,linux-pam)
247 ("libpng" ,libpng)
248 ("libjpeg" ,libjpeg)
249 ("freeglut" ,freeglut)
250 ("libxrandr" ,libxrandr)
251 ("libxrender" ,libxrender)
252 ("freetype" ,freetype)
253 ("fontconfig" ,fontconfig)
254 ("libx11" ,libx11)
255 ("libxft" ,libxft)
256 ("libxmu" ,libxmu)
257 ("xauth" ,xauth)))
258 (native-inputs
259 `(("pkg-config" ,pkg-config)))
260 (arguments
261 '(#:phases
262 (modify-phases %standard-phases
263 (add-before 'configure 'set-new-etc-location
264 (lambda _
265 (substitute* "CMakeLists.txt"
266 (("/etc")
267 (string-append (assoc-ref %outputs "out") "/etc"))
268 (("install.*systemd.*")
269 ;; The build system's logic here is: if "Linux", then
270 ;; "systemd". Strip that.
271 ""))
272 #t)))
273 #:configure-flags '("-DUSE_PAM=yes"
274 "-DUSE_CONSOLEKIT=no")
275 #:tests? #f))
276
277 ;; This used to be at <http://slim.berlios.de/>.
278 (home-page "https://sourceforge.net/projects/slim.berlios/")
279 (synopsis "Desktop-independent graphical login manager for X11")
280 (description
281 "SLiM is a Desktop-independent graphical login manager for X11, derived
282 from Login.app. It aims to be light and simple, although completely
283 configurable through themes and an option file; is suitable for machines on
284 which remote login functionalities are not needed.
285
286 Features included: PNG and XFT support for alpha transparency and antialiased
287 fonts, External themes support, Configurable runtime options: X server --
288 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
289 input control, Can load predefined user at startup, Configurable welcome /
290 shutdown messages, Random theme selection.")
291 (license license:gpl2)))