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>
11 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
53 (define-public greenisland
60 "https://github.com/greenisland/greenisland"
61 "/releases/download/v" version "/"
62 "greenisland-" version ".tar.xz"))
65 "1flmha31hmii6m2mdvmn1q5dc0fhnvgc4lp1b4wgkz20y7x4f1fm"))))
66 (build-system cmake-build-system)
68 `(("extra-cmake-modules" ,extra-cmake-modules)
70 ("glib:bin" ,glib "bin")
71 ("pkg-config" ,pkg-config)
72 ("xorg-server" ,xorg-server)))
74 `(("elogind" ,elogind)
76 ("fontconfig" ,fontconfig)
77 ("freetype" ,freetype)
80 ("libinput" ,libinput-minimal)
81 ("libxcursor" ,libxcursor)
82 ("libxkbcommon" ,libxkbcommon)
86 ("qtdeclarative" ,qtdeclarative)
88 ("wayland-protocols" ,wayland-protocols)
89 ("xcb-util-cursor" ,xcb-util-cursor)))
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)
99 #:imported-modules (,@%cmake-build-system-modules
100 (guix build qt-utils))
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"))))
110 (setenv "DBUS_FATAL_WARNINGS" "0")
111 (zero? (system* "dbus-launch" "ctest" "."))))
112 (add-before 'check 'check-setup
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))
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")
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))))
142 "https://github.com/sddm/sddm"
143 "/releases/download/v" version "/"
144 "sddm-" version ".tar.xz"))
147 "0ch6rdppgy2vbzw0c2x9a4c6ry46vx7p6b76d8xbh2nvxh23xv0k"))
148 (patches (search-patches "sddm-fix-build-with-qt-5.11-1024.patch"))))
149 (build-system cmake-build-system)
151 `(("extra-cmake-modules" ,extra-cmake-modules)
152 ("pkg-config" ,pkg-config)
153 ("qttools" ,qttools)))
155 `(("elogind" ,elogind)
158 ("libxkbcommon" ,libxkbcommon)
159 ("linux-pam" ,linux-pam)
161 ("qtdeclarative" ,qtdeclarative)
163 ("wayland" ,wayland)))
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"
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")
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)
186 #:imported-modules (,@%cmake-build-system-modules
187 (guix build qt-utils))
189 (modify-phases %standard-phases
190 (add-after 'unpack 'embed-loginctl-reference
192 (substitute* "CMakeLists.txt"
193 (("/usr/bin/loginctl") (which "loginctl")))
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")
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))))
210 (define-public lightdm
216 (uri (string-append "https://launchpad.net/lightdm/"
217 (version-major+minor version) "/"
218 version "/+download/lightdm-"
222 "18j33bm54i8k7ncxcs69zqi4105s62n58jrydqn3ikrb71s9nl6d"))))
223 (build-system gnu-build-system)
225 '(#:parallel-tests? #f ; fails when run in parallel
227 (list "--localstatedir=/var")
229 (modify-phases %standard-phases
230 (add-after 'unpack 'fix-paths
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")))
241 (add-after 'unpack 'disable-broken-tests
243 (substitute* "tests/Makefile.in"
244 (("test-sessions-gobject ") "")
245 ((" test-sessions-python ") " "))
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"))))
254 ;; Avoid printing locale warnings, which trip up the text
260 ("linux-pam" ,linux-pam)
261 ("util-linux" ,util-linux) ; for sbin/nologin
262 ("libgcrypt" ,libgcrypt)
265 `(("gobject-introspection" ,gobject-introspection)
266 ("pkg-config" ,pkg-config)
268 ("intltool" ,intltool)
272 ("python-pygobject" ,python2-pygobject)))
273 ;; Required by liblightdm-gobject-1.pc.
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+)))
284 (define-public lightdm-gtk-greeter
286 (name "lightdm-gtk-greeter")
291 "https://launchpad.net/lightdm-gtk-greeter/"
292 (version-major+minor version) "/" version
293 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
296 "1436sdm83xqhxyr1rzqxhsl8if2xmidlvb341xcv6dv83lyxkrlf"))))
297 (build-system gnu-build-system)
300 ("intltool" ,intltool)
301 ("pkg-config" ,pkg-config)))
303 `(("lightdm" ,lightdm)
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+)))
317 ;; Used to be available from download.berlios.de.
319 "mirror://sourceforge/slim.berlios/slim-"
322 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
323 (patches (search-patches "slim-config.patch"
327 "slim-sigusr1.patch"))))
328 (build-system cmake-build-system)
329 (inputs `(("linux-pam" ,linux-pam)
332 ("freeglut" ,freeglut)
333 ("libxrandr" ,libxrandr)
334 ("libxrender" ,libxrender)
335 ("freetype" ,freetype)
336 ("fontconfig" ,fontconfig)
342 `(("pkg-config" ,pkg-config)))
345 (modify-phases %standard-phases
346 (add-before 'configure 'set-new-etc-location
348 (substitute* "CMakeLists.txt"
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.
356 #:configure-flags '("-DUSE_PAM=yes"
357 "-DUSE_CONSOLEKIT=no")
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")
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.
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)))