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