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