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>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
52 (define-public greenisland
59 "https://github.com/greenisland/greenisland"
60 "/releases/download/v" version "/"
61 "greenisland-" version ".tar.xz"))
64 "1flmha31hmii6m2mdvmn1q5dc0fhnvgc4lp1b4wgkz20y7x4f1fm"))))
65 (build-system cmake-build-system)
67 `(("extra-cmake-modules" ,extra-cmake-modules)
69 ("glib:bin" ,glib "bin")
70 ("pkg-config" ,pkg-config)
71 ("xorg-server" ,xorg-server)))
73 `(("elogind" ,elogind)
75 ("fontconfig" ,fontconfig)
76 ("freetype" ,freetype)
79 ("libinput" ,libinput-minimal)
80 ("libxcursor" ,libxcursor)
81 ("libxkbcommon" ,libxkbcommon)
85 ("qtdeclarative" ,qtdeclarative)
87 ("wayland-protocols" ,wayland-protocols)
88 ("xcb-util-cursor" ,xcb-util-cursor)))
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)
98 #:imported-modules (,@%cmake-build-system-modules
99 (guix build qt-utils))
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"))))
109 (setenv "DBUS_FATAL_WARNINGS" "0")
110 (invoke "dbus-launch" "ctest" ".")))
111 (add-before 'check 'check-setup
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))
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")
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))))
141 "https://github.com/sddm/sddm"
142 "/releases/download/v" version "/"
143 "sddm-" version ".tar.xz"))
146 "0icyi9nqgbp2v6dwh3n3jzff9jv2xy8d4rbsz89hd65x7c3hrv87"))))
147 (build-system cmake-build-system)
149 `(("extra-cmake-modules" ,extra-cmake-modules)
150 ("pkg-config" ,pkg-config)
151 ("qttools" ,qttools)))
153 `(("elogind" ,elogind)
156 ("libxkbcommon" ,libxkbcommon)
157 ("linux-pam" ,linux-pam)
159 ("qtdeclarative" ,qtdeclarative)
161 ("wayland" ,wayland)))
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"
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")
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)
184 #:imported-modules (,@%cmake-build-system-modules
185 (guix build qt-utils))
187 (modify-phases %standard-phases
188 (add-after 'unpack 'embed-loginctl-reference
190 (substitute* "CMakeLists.txt"
191 (("/usr/bin/loginctl") (which "loginctl")))
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")
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))))
208 (define-public lightdm
214 (uri (string-append "https://launchpad.net/lightdm/"
215 (version-major+minor version) "/"
216 version "/+download/lightdm-"
220 "18j33bm54i8k7ncxcs69zqi4105s62n58jrydqn3ikrb71s9nl6d"))))
221 (build-system gnu-build-system)
223 '(#:parallel-tests? #f ; fails when run in parallel
225 (list "--localstatedir=/var")
227 (modify-phases %standard-phases
228 (add-after 'unpack 'fix-paths
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")))
239 (add-after 'unpack 'disable-broken-tests
241 (substitute* "tests/Makefile.in"
242 (("test-sessions-gobject ") "")
243 ((" test-sessions-python ") " "))
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"))))
252 ;; Avoid printing locale warnings, which trip up the text
258 ("linux-pam" ,linux-pam)
259 ("shadow" ,shadow) ;for sbin/nologin
260 ("libgcrypt" ,libgcrypt)
263 `(("gobject-introspection" ,gobject-introspection)
264 ("pkg-config" ,pkg-config)
266 ("intltool" ,intltool)
270 ("python-pygobject" ,python2-pygobject)))
271 ;; Required by liblightdm-gobject-1.pc.
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+)))
282 (define-public lightdm-gtk-greeter
284 (name "lightdm-gtk-greeter")
289 "https://launchpad.net/lightdm-gtk-greeter/"
290 (version-major+minor version) "/" version
291 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
294 "1436sdm83xqhxyr1rzqxhsl8if2xmidlvb341xcv6dv83lyxkrlf"))))
295 (build-system gnu-build-system)
298 ("intltool" ,intltool)
299 ("pkg-config" ,pkg-config)))
301 `(("lightdm" ,lightdm)
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+)))
315 ;; Used to be available from download.berlios.de.
317 "mirror://sourceforge/slim.berlios/slim-"
320 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
321 (patches (search-patches "slim-config.patch"
325 "slim-sigusr1.patch"))))
326 (build-system cmake-build-system)
327 (inputs `(("linux-pam" ,linux-pam)
330 ("freeglut" ,freeglut)
331 ("libxrandr" ,libxrandr)
332 ("libxrender" ,libxrender)
333 ("freetype" ,freetype)
334 ("fontconfig" ,fontconfig)
340 `(("pkg-config" ,pkg-config)))
343 (modify-phases %standard-phases
344 (add-before 'configure 'set-new-etc-location
346 (substitute* "CMakeLists.txt"
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.
354 #:configure-flags '("-DUSE_PAM=yes"
355 "-DUSE_CONSOLEKIT=no")
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")
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.
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)))