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>
8 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
50 (define-public greenisland
57 "https://github.com/greenisland/greenisland"
58 "/releases/download/v" version "/"
59 "greenisland-" version ".tar.xz"))
62 "1flmha31hmii6m2mdvmn1q5dc0fhnvgc4lp1b4wgkz20y7x4f1fm"))))
63 (build-system cmake-build-system)
65 `(("extra-cmake-modules" ,extra-cmake-modules)
67 ("glib:bin" ,glib "bin")
68 ("pkg-config" ,pkg-config)
69 ("xorg-server" ,xorg-server)))
71 `(("elogind" ,elogind)
73 ("fontconfig" ,fontconfig)
74 ("freetype" ,freetype)
77 ("libinput" ,libinput-minimal)
78 ("libxcursor" ,libxcursor)
79 ("libxkbcommon" ,libxkbcommon)
83 ("qtdeclarative" ,qtdeclarative)
85 ("wayland-protocols" ,wayland-protocols)
86 ("xcb-util-cursor" ,xcb-util-cursor)))
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)
96 #:imported-modules (,@%cmake-build-system-modules
97 (guix build qt-utils))
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"))))
107 (setenv "DBUS_FATAL_WARNINGS" "0")
108 (zero? (system* "dbus-launch" "ctest" "."))))
109 (add-before 'check 'check-setup
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))
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")
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))))
139 "https://github.com/sddm/sddm"
140 "/releases/download/v" version "/"
141 "sddm-" version ".tar.gz"))
144 "0x1igkjm3k8q26xbmg0qah1fc2pn2sfc675w0xg42x7ncrdiw8d4"))))
145 (build-system cmake-build-system)
147 `(("extra-cmake-modules" ,extra-cmake-modules)
148 ("pkg-config" ,pkg-config)
149 ("qttools" ,qttools)))
151 `(("elogind" ,elogind)
154 ("libxkbcommon" ,libxkbcommon)
155 ("linux-pam" ,linux-pam)
157 ("qtdeclarative" ,qtdeclarative)
159 ("wayland" ,wayland)))
163 ;; Currently doesn't do anything
164 ;; Option added by enable wayland greeters PR
165 "-DENABLE_WAYLAND=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")
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)
182 #:imported-modules (,@%cmake-build-system-modules
183 (guix build qt-utils))
185 (modify-phases %standard-phases
186 (add-after 'unpack 'embed-loginctl-reference
188 (substitute* "CMakeLists.txt"
189 (("/usr/bin/loginctl") (which "loginctl")))
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")
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))))
206 (define-public lightdm
212 (uri (string-append "https://launchpad.net/lightdm/"
213 (version-major+minor version) "/"
214 version "/+download/lightdm-"
218 "0a5bvfl2h7r873al6q7c819h0kg564k9fh51rl6489z6lyvazfg4"))))
219 (build-system gnu-build-system)
221 '(#:parallel-tests? #f ; fails when run in parallel
223 (list "--localstatedir=/var")
225 (modify-phases %standard-phases
226 (add-after 'unpack 'fix-paths
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")))
237 (add-after 'unpack 'disable-broken-tests
239 (substitute* "tests/Makefile.in"
240 (("test-sessions-gobject ") "")
241 ((" test-sessions-python ") " "))
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"))))
250 ;; Avoid printing locale warnings, which trip up the text
256 ("linux-pam" ,linux-pam)
257 ("util-linux" ,util-linux) ; for sbin/nologin
258 ("libgcrypt" ,libgcrypt)
261 `(("gobject-introspection" ,gobject-introspection)
262 ("pkg-config" ,pkg-config)
264 ("intltool" ,intltool)
268 ("python-pygobject" ,python2-pygobject)))
269 ;; Required by liblightdm-gobject-1.pc.
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+)))
280 (define-public lightdm-gtk-greeter
282 (name "lightdm-gtk-greeter")
287 "https://launchpad.net/lightdm-gtk-greeter/"
288 (version-major+minor version) "/" version
289 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
292 "1436sdm83xqhxyr1rzqxhsl8if2xmidlvb341xcv6dv83lyxkrlf"))))
293 (build-system gnu-build-system)
296 ("intltool" ,intltool)
297 ("pkg-config" ,pkg-config)))
299 `(("lightdm" ,lightdm)
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+)))
313 ;; Used to be available from download.berlios.de.
315 "mirror://sourceforge/slim.berlios/slim-"
318 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
319 (patches (search-patches "slim-config.patch"
323 "slim-sigusr1.patch"))))
324 (build-system cmake-build-system)
325 (inputs `(("linux-pam" ,linux-pam)
328 ("freeglut" ,freeglut)
329 ("libxrandr" ,libxrandr)
330 ("libxrender" ,libxrender)
331 ("freetype" ,freetype)
332 ("fontconfig" ,fontconfig)
338 `(("pkg-config" ,pkg-config)))
340 '(#:phases (alist-cons-before
341 'configure 'set-new-etc-location
343 (substitute* "CMakeLists.txt"
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.
351 #:configure-flags '("-DUSE_PAM=yes"
352 "-DUSE_CONSOLEKIT=no")
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")
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.
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)))