Merge branch 'master' 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 ;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
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.
17 ;;;
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.
22 ;;;
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/>.
25
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 gnu)
32 #:use-module (guix packages)
33 #:use-module (guix utils)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages admin)
36 #:use-module (gnu packages fontutils)
37 #:use-module (gnu packages freedesktop)
38 #:use-module (gnu packages gl)
39 #:use-module (gnu packages glib)
40 #:use-module (gnu packages gnome)
41 #:use-module (gnu packages gnupg)
42 #:use-module (gnu packages gtk)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages kde-frameworks)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages xdisorg)
50 #:use-module (gnu packages xfce)
51 #:use-module (gnu packages xorg))
52
53 (define-public greenisland
54 (package
55 (name "greenisland")
56 (version "0.9.0.1")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append
60 "https://github.com/greenisland/greenisland"
61 "/releases/download/v" version "/"
62 "greenisland-" version ".tar.xz"))
63 (sha256
64 (base32
65 "1flmha31hmii6m2mdvmn1q5dc0fhnvgc4lp1b4wgkz20y7x4f1fm"))))
66 (build-system cmake-build-system)
67 (native-inputs
68 `(("extra-cmake-modules" ,extra-cmake-modules)
69 ("dbus" ,dbus)
70 ("glib:bin" ,glib "bin")
71 ("pkg-config" ,pkg-config)
72 ("xorg-server" ,xorg-server)))
73 (inputs
74 `(("elogind" ,elogind)
75 ("eudev" ,eudev)
76 ("fontconfig" ,fontconfig)
77 ("freetype" ,freetype)
78 ("glib" ,glib)
79 ("libdrm" ,libdrm)
80 ("libinput" ,libinput-minimal)
81 ("libxcursor" ,libxcursor)
82 ("libxkbcommon" ,libxkbcommon)
83 ("libx11" ,libx11)
84 ("mesa" ,mesa)
85 ("qtbase" ,qtbase)
86 ("qtdeclarative" ,qtdeclarative)
87 ("wayland" ,wayland)
88 ("wayland-protocols" ,wayland-protocols)
89 ("xcb-util-cursor" ,xcb-util-cursor)))
90 (arguments
91 `(#:configure-flags
92 (list (string-append "-DPLUGIN_INSTALL_DIR="
93 (assoc-ref %outputs "out") "/plugins")
94 (string-append "-DQML_INSTALL_DIR="
95 (assoc-ref %outputs "out") "/qml"))
96 #:modules ((guix build cmake-build-system)
97 (guix build qt-utils)
98 (guix build utils))
99 #:imported-modules (,@%cmake-build-system-modules
100 (guix build qt-utils))
101 #:phases
102 (modify-phases %standard-phases
103 (add-after 'unpack 'disable-udev-tests
104 (lambda _ ; FIXME: Build env doesn't contain /dev/sda
105 (substitute* "tests/auto/platform/tst_udev.cpp"
106 (("QVERIFY") "// QVERIFY")
107 (("QCOMPARE") "// QCOMPARE"))))
108 (replace 'check
109 (lambda _
110 (setenv "DBUS_FATAL_WARNINGS" "0")
111 (zero? (system* "dbus-launch" "ctest" "."))))
112 (add-before 'check 'check-setup
113 (lambda _
114 (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
115 ;; make Qt render "offscreen", required for tests
116 (setenv "QT_QPA_PLATFORM" "offscreen")
117 (setenv "XDG_RUNTIME_DIR" (getcwd))
118 #t))
119 (add-after 'install 'wrap-programs
120 (lambda* (#:key outputs #:allow-other-keys)
121 (let ((out (assoc-ref outputs "out")))
122 (wrap-qt-program out "greenisland")
123 (wrap-qt-program out "greenisland-launcher")
124 (wrap-qt-program out "greenisland-screencaster")
125 (wrap-qt-program out "greenisland-wayland-scanner")
126 #t))))))
127 (synopsis "QtQuick Wayland compositor and shell for desktop and mobile")
128 (description "Green Island provides a full blown Wayland compositor for
129 QtQuick as well as pluggable hardware abstraction, extensions, tools and a
130 Qt-style API for Wayland clients.")
131 (home-page "http://hawaiios.org")
132 ;; Choice of license at the user's opinion.
133 (license (list license:gpl2 license:gpl3 license:lgpl2.1 license:lgpl3))))
134
135 (define-public sddm
136 (package
137 (name "sddm")
138 (version "0.18.0")
139 (source (origin
140 (method url-fetch)
141 (uri (string-append
142 "https://github.com/sddm/sddm"
143 "/releases/download/v" version "/"
144 "sddm-" version ".tar.xz"))
145 (sha256
146 (base32
147 "0icyi9nqgbp2v6dwh3n3jzff9jv2xy8d4rbsz89hd65x7c3hrv87"))))
148 (build-system cmake-build-system)
149 (native-inputs
150 `(("extra-cmake-modules" ,extra-cmake-modules)
151 ("pkg-config" ,pkg-config)
152 ("qttools" ,qttools)))
153 (inputs
154 `(("elogind" ,elogind)
155 ("glib" ,glib)
156 ("libxcb" ,libxcb)
157 ("libxkbcommon" ,libxkbcommon)
158 ("linux-pam" ,linux-pam)
159 ("qtbase" ,qtbase)
160 ("qtdeclarative" ,qtdeclarative)
161 ("shadow" ,shadow)
162 ("wayland" ,wayland)))
163 (arguments
164 `(#:configure-flags
165 (list
166 ;; This option currently does nothing, but will presumably be enabled
167 ;; if/when <https://github.com/sddm/sddm/pull/616> is merged.
168 "-DENABLE_WAYLAND=ON"
169 "-DENABLE_PAM=ON"
170 ;; Both flags are required for elogind support.
171 "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
172 "-DCONFIG_FILE=/etc/sddm.conf"
173 ;; Set path to /etc/login.defs.
174 ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
175 (string-append "-DLOGIN_DEFS_PATH="
176 (assoc-ref %build-inputs "shadow")
177 "/etc/login.defs")
178 (string-append "-DQT_IMPORTS_DIR="
179 (assoc-ref %outputs "out") "/qml")
180 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
181 (assoc-ref %outputs "out") "/etc"))
182 #:modules ((guix build cmake-build-system)
183 (guix build qt-utils)
184 (guix build utils))
185 #:imported-modules (,@%cmake-build-system-modules
186 (guix build qt-utils))
187 #:phases
188 (modify-phases %standard-phases
189 (add-after 'unpack 'embed-loginctl-reference
190 (lambda _
191 (substitute* "CMakeLists.txt"
192 (("/usr/bin/loginctl") (which "loginctl")))
193 #t))
194 (add-after 'install 'wrap-programs
195 (lambda* (#:key outputs #:allow-other-keys)
196 (let ((out (assoc-ref outputs "out")))
197 (wrap-qt-program out "sddm")
198 (wrap-qt-program out "sddm-greeter")
199 #t))))))
200 (synopsis "QML based X11 and Wayland display manager")
201 (description "SDDM is a display manager for X11 and Wayland aiming to be
202 fast, simple and beautiful. SDDM is themeable and puts no restrictions on the
203 user interface design. It uses QtQuick which gives the designer the ability to
204 create smooth, animated user interfaces.")
205 (home-page "https://github.com/sddm/sddm")
206 ;; QML files are MIT licensed and images are CC BY 3.0.
207 (license (list license:gpl2+ license:expat license:cc-by3.0))))
208
209 (define-public lightdm
210 (package
211 (name "lightdm")
212 (version "1.24.0")
213 (source (origin
214 (method url-fetch)
215 (uri (string-append "https://launchpad.net/lightdm/"
216 (version-major+minor version) "/"
217 version "/+download/lightdm-"
218 version ".tar.xz"))
219 (sha256
220 (base32
221 "18j33bm54i8k7ncxcs69zqi4105s62n58jrydqn3ikrb71s9nl6d"))))
222 (build-system gnu-build-system)
223 (arguments
224 '(#:parallel-tests? #f ; fails when run in parallel
225 #:configure-flags
226 (list "--localstatedir=/var")
227 #:phases
228 (modify-phases %standard-phases
229 (add-after 'unpack 'fix-paths
230 (lambda _
231 (substitute* "src/shared-data-manager.c"
232 (("/bin/rm") (which "rm")))
233 (substitute* '("data/users.conf"
234 "common/user-list.c")
235 (("/bin/false") (which "false"))
236 (("/usr/sbin/nologin") (which "nologin")))
237 (substitute* "src/seat.c"
238 (("/bin/sh") (which "sh")))
239 #t))
240 (add-after 'unpack 'disable-broken-tests
241 (lambda _
242 (substitute* "tests/Makefile.in"
243 (("test-sessions-gobject ") "")
244 ((" test-sessions-python ") " "))
245 #t))
246 (add-before 'check 'pre-check
247 ;; Run test-suite under a dbus session.
248 (lambda* (#:key inputs #:allow-other-keys)
249 (wrap-program "tests/src/test-python-greeter"
250 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
251 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
252
253 ;; Avoid printing locale warnings, which trip up the text
254 ;; matching tests.
255 (unsetenv "LC_ALL")
256 #t)))))
257 (inputs
258 `(("audit" ,audit)
259 ("linux-pam" ,linux-pam)
260 ("shadow" ,shadow) ;for sbin/nologin
261 ("libgcrypt" ,libgcrypt)
262 ("libxcb" ,libxcb)))
263 (native-inputs
264 `(("gobject-introspection" ,gobject-introspection)
265 ("pkg-config" ,pkg-config)
266 ("itstool" ,itstool)
267 ("intltool" ,intltool)
268 ;; For tests
269 ("dbus" ,dbus)
270 ("python" ,python-2)
271 ("python-pygobject" ,python2-pygobject)))
272 ;; Required by liblightdm-gobject-1.pc.
273 (propagated-inputs
274 `(("glib" ,glib)
275 ("libx11" ,libx11)
276 ("libxklavier" ,libxklavier)))
277 (home-page "https://www.freedesktop.org/wiki/Software/LightDM/")
278 (synopsis "Lightweight display manager")
279 (description "The Light Display Manager (LightDM) is a cross-desktop
280 display manager which supports different greeters.")
281 (license license:gpl3+)))
282
283 (define-public lightdm-gtk-greeter
284 (package
285 (name "lightdm-gtk-greeter")
286 (version "2.0.2")
287 (source (origin
288 (method url-fetch)
289 (uri (string-append
290 "https://launchpad.net/lightdm-gtk-greeter/"
291 (version-major+minor version) "/" version
292 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
293 (sha256
294 (base32
295 "1436sdm83xqhxyr1rzqxhsl8if2xmidlvb341xcv6dv83lyxkrlf"))))
296 (build-system gnu-build-system)
297 (native-inputs
298 `(("exo" ,exo)
299 ("intltool" ,intltool)
300 ("pkg-config" ,pkg-config)))
301 (inputs
302 `(("lightdm" ,lightdm)
303 ("gtk+" ,gtk+)))
304 (synopsis "GTK+ greeter for LightDM")
305 (home-page "https://launchpad.net/lightdm-gtk-greeter")
306 (description "This package provides a LightDM greeter implementation using
307 GTK+, lets you select a desktop session and log in to it.")
308 (license license:gpl3+)))
309
310 (define-public slim
311 (package
312 (name "slim")
313 (version "1.3.6")
314 (source (origin
315 (method url-fetch)
316 ;; Used to be available from download.berlios.de.
317 (uri (string-append
318 "mirror://sourceforge/slim.berlios/slim-"
319 version ".tar.gz"))
320 (sha256
321 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
322 (patches (search-patches "slim-config.patch"
323 "slim-reset.patch"
324 "slim-login.patch"
325 "slim-session.patch"
326 "slim-sigusr1.patch"))))
327 (build-system cmake-build-system)
328 (inputs `(("linux-pam" ,linux-pam)
329 ("libpng" ,libpng)
330 ("libjpeg" ,libjpeg)
331 ("freeglut" ,freeglut)
332 ("libxrandr" ,libxrandr)
333 ("libxrender" ,libxrender)
334 ("freetype" ,freetype)
335 ("fontconfig" ,fontconfig)
336 ("libx11" ,libx11)
337 ("libxft" ,libxft)
338 ("libxmu" ,libxmu)
339 ("xauth" ,xauth)))
340 (native-inputs
341 `(("pkg-config" ,pkg-config)))
342 (arguments
343 '(#:phases
344 (modify-phases %standard-phases
345 (add-before 'configure 'set-new-etc-location
346 (lambda _
347 (substitute* "CMakeLists.txt"
348 (("/etc")
349 (string-append (assoc-ref %outputs "out") "/etc"))
350 (("install.*systemd.*")
351 ;; The build system's logic here is: if "Linux", then
352 ;; "systemd". Strip that.
353 ""))
354 #t)))
355 #:configure-flags '("-DUSE_PAM=yes"
356 "-DUSE_CONSOLEKIT=no")
357 #:tests? #f))
358
359 ;; This used to be at <http://slim.berlios.de/>.
360 (home-page "https://sourceforge.net/projects/slim.berlios/")
361 (synopsis "Desktop-independent graphical login manager for X11")
362 (description
363 "SLiM is a Desktop-independent graphical login manager for X11, derived
364 from Login.app. It aims to be light and simple, although completely
365 configurable through themes and an option file; is suitable for machines on
366 which remote login functionalities are not needed.
367
368 Features included: PNG and XFT support for alpha transparency and antialiased
369 fonts, External themes support, Configurable runtime options: X server --
370 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
371 input control, Can load predefined user at startup, Configurable welcome /
372 shutdown messages, Random theme selection.")
373 (license license:gpl2)))