Merge branch 'master' into staging
[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 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.17.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 "0ch6rdppgy2vbzw0c2x9a4c6ry46vx7p6b76d8xbh2nvxh23xv0k"))
148 (patches (search-patches "sddm-fix-build-with-qt-5.11-1024.patch"))))
149 (build-system cmake-build-system)
150 (native-inputs
151 `(("extra-cmake-modules" ,extra-cmake-modules)
152 ("pkg-config" ,pkg-config)
153 ("qttools" ,qttools)))
154 (inputs
155 `(("elogind" ,elogind)
156 ("glib" ,glib)
157 ("libxcb" ,libxcb)
158 ("libxkbcommon" ,libxkbcommon)
159 ("linux-pam" ,linux-pam)
160 ("qtbase" ,qtbase)
161 ("qtdeclarative" ,qtdeclarative)
162 ("shadow" ,shadow)
163 ("wayland" ,wayland)))
164 (arguments
165 `(#:configure-flags
166 (list
167 ;; This option currently does nothing, but will presumably be enabled
168 ;; if/when <https://github.com/sddm/sddm/pull/616> is merged.
169 "-DENABLE_WAYLAND=ON"
170 "-DENABLE_PAM=ON"
171 ;; Both flags are required for elogind support.
172 "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
173 "-DCONFIG_FILE=/etc/sddm.conf"
174 ;; Set path to /etc/login.defs.
175 ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
176 (string-append "-DLOGIN_DEFS_PATH="
177 (assoc-ref %build-inputs "shadow")
178 "/etc/login.defs")
179 (string-append "-DQT_IMPORTS_DIR="
180 (assoc-ref %outputs "out") "/qml")
181 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
182 (assoc-ref %outputs "out") "/etc"))
183 #:modules ((guix build cmake-build-system)
184 (guix build qt-utils)
185 (guix build utils))
186 #:imported-modules (,@%cmake-build-system-modules
187 (guix build qt-utils))
188 #:phases
189 (modify-phases %standard-phases
190 (add-after 'unpack 'embed-loginctl-reference
191 (lambda _
192 (substitute* "CMakeLists.txt"
193 (("/usr/bin/loginctl") (which "loginctl")))
194 #t))
195 (add-after 'install 'wrap-programs
196 (lambda* (#:key outputs #:allow-other-keys)
197 (let ((out (assoc-ref outputs "out")))
198 (wrap-qt-program out "sddm")
199 (wrap-qt-program out "sddm-greeter")
200 #t))))))
201 (synopsis "QML based X11 and Wayland display manager")
202 (description "SDDM is a display manager for X11 and Wayland aiming to be
203 fast, simple and beautiful. SDDM is themeable and puts no restrictions on the
204 user interface design. It uses QtQuick which gives the designer the ability to
205 create smooth, animated user interfaces.")
206 (home-page "https://github.com/sddm/sddm")
207 ;; QML files are MIT licensed and images are CC BY 3.0.
208 (license (list license:gpl2+ license:expat license:cc-by3.0))))
209
210 (define-public lightdm
211 (package
212 (name "lightdm")
213 (version "1.24.0")
214 (source (origin
215 (method url-fetch)
216 (uri (string-append "https://launchpad.net/lightdm/"
217 (version-major+minor version) "/"
218 version "/+download/lightdm-"
219 version ".tar.xz"))
220 (sha256
221 (base32
222 "18j33bm54i8k7ncxcs69zqi4105s62n58jrydqn3ikrb71s9nl6d"))))
223 (build-system gnu-build-system)
224 (arguments
225 '(#:parallel-tests? #f ; fails when run in parallel
226 #:configure-flags
227 (list "--localstatedir=/var")
228 #:phases
229 (modify-phases %standard-phases
230 (add-after 'unpack 'fix-paths
231 (lambda _
232 (substitute* "src/shared-data-manager.c"
233 (("/bin/rm") (which "rm")))
234 (substitute* '("data/users.conf"
235 "common/user-list.c")
236 (("/bin/false") (which "false"))
237 (("/usr/sbin/nologin") (which "nologin")))
238 (substitute* "src/seat.c"
239 (("/bin/sh") (which "sh")))
240 #t))
241 (add-after 'unpack 'disable-broken-tests
242 (lambda _
243 (substitute* "tests/Makefile.in"
244 (("test-sessions-gobject ") "")
245 ((" test-sessions-python ") " "))
246 #t))
247 (add-before 'check 'pre-check
248 ;; Run test-suite under a dbus session.
249 (lambda* (#:key inputs #:allow-other-keys)
250 (wrap-program "tests/src/test-python-greeter"
251 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
252 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
253
254 ;; Avoid printing locale warnings, which trip up the text
255 ;; matching tests.
256 (unsetenv "LC_ALL")
257 #t)))))
258 (inputs
259 `(("audit" ,audit)
260 ("linux-pam" ,linux-pam)
261 ("util-linux" ,util-linux) ; for sbin/nologin
262 ("libgcrypt" ,libgcrypt)
263 ("libxcb" ,libxcb)))
264 (native-inputs
265 `(("gobject-introspection" ,gobject-introspection)
266 ("pkg-config" ,pkg-config)
267 ("itstool" ,itstool)
268 ("intltool" ,intltool)
269 ;; For tests
270 ("dbus" ,dbus)
271 ("python" ,python-2)
272 ("python-pygobject" ,python2-pygobject)))
273 ;; Required by liblightdm-gobject-1.pc.
274 (propagated-inputs
275 `(("glib" ,glib)
276 ("libx11" ,libx11)
277 ("libxklavier" ,libxklavier)))
278 (home-page "https://www.freedesktop.org/wiki/Software/LightDM/")
279 (synopsis "Lightweight display manager")
280 (description "The Light Display Manager (LightDM) is a cross-desktop
281 display manager which supports different greeters.")
282 (license license:gpl3+)))
283
284 (define-public lightdm-gtk-greeter
285 (package
286 (name "lightdm-gtk-greeter")
287 (version "2.0.2")
288 (source (origin
289 (method url-fetch)
290 (uri (string-append
291 "https://launchpad.net/lightdm-gtk-greeter/"
292 (version-major+minor version) "/" version
293 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
294 (sha256
295 (base32
296 "1436sdm83xqhxyr1rzqxhsl8if2xmidlvb341xcv6dv83lyxkrlf"))))
297 (build-system gnu-build-system)
298 (native-inputs
299 `(("exo" ,exo)
300 ("intltool" ,intltool)
301 ("pkg-config" ,pkg-config)))
302 (inputs
303 `(("lightdm" ,lightdm)
304 ("gtk+" ,gtk+)))
305 (synopsis "GTK+ greeter for LightDM")
306 (home-page "https://launchpad.net/lightdm-gtk-greeter")
307 (description "This package provides a LightDM greeter implementation using
308 GTK+, lets you select a desktop session and log in to it.")
309 (license license:gpl3+)))
310
311 (define-public slim
312 (package
313 (name "slim")
314 (version "1.3.6")
315 (source (origin
316 (method url-fetch)
317 ;; Used to be available from download.berlios.de.
318 (uri (string-append
319 "mirror://sourceforge/slim.berlios/slim-"
320 version ".tar.gz"))
321 (sha256
322 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
323 (patches (search-patches "slim-config.patch"
324 "slim-reset.patch"
325 "slim-login.patch"
326 "slim-session.patch"
327 "slim-sigusr1.patch"))))
328 (build-system cmake-build-system)
329 (inputs `(("linux-pam" ,linux-pam)
330 ("libpng" ,libpng)
331 ("libjpeg" ,libjpeg)
332 ("freeglut" ,freeglut)
333 ("libxrandr" ,libxrandr)
334 ("libxrender" ,libxrender)
335 ("freetype" ,freetype)
336 ("fontconfig" ,fontconfig)
337 ("libx11" ,libx11)
338 ("libxft" ,libxft)
339 ("libxmu" ,libxmu)
340 ("xauth" ,xauth)))
341 (native-inputs
342 `(("pkg-config" ,pkg-config)))
343 (arguments
344 '(#:phases
345 (modify-phases %standard-phases
346 (add-before 'configure 'set-new-etc-location
347 (lambda _
348 (substitute* "CMakeLists.txt"
349 (("/etc")
350 (string-append (assoc-ref %outputs "out") "/etc"))
351 (("install.*systemd.*")
352 ;; The build system's logic here is: if "Linux", then
353 ;; "systemd". Strip that.
354 ""))
355 #t)))
356 #:configure-flags '("-DUSE_PAM=yes"
357 "-DUSE_CONSOLEKIT=no")
358 #:tests? #f))
359
360 ;; This used to be at <http://slim.berlios.de/>.
361 (home-page "https://sourceforge.net/projects/slim.berlios/")
362 (synopsis "Desktop-independent graphical login manager for X11")
363 (description
364 "SLiM is a Desktop-independent graphical login manager for X11, derived
365 from Login.app. It aims to be light and simple, although completely
366 configurable through themes and an option file; is suitable for machines on
367 which remote login functionalities are not needed.
368
369 Features included: PNG and XFT support for alpha transparency and antialiased
370 fonts, External themes support, Configurable runtime options: X server --
371 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
372 input control, Can load predefined user at startup, Configurable welcome /
373 shutdown messages, Random theme selection.")
374 (license license:gpl2)))