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>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages display-managers)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system cmake)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix packages)
31 #:use-module (guix utils)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages admin)
34 #:use-module (gnu packages fontutils)
35 #:use-module (gnu packages freedesktop)
36 #:use-module (gnu packages gl)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gnome)
39 #:use-module (gnu packages gnupg)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages image)
42 #:use-module (gnu packages kde-frameworks)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages qt)
47 #:use-module (gnu packages xdisorg)
48 #:use-module (gnu packages xfce)
49 #:use-module (gnu packages xorg))
51 (define-public greenisland
58 "https://github.com/greenisland/greenisland"
59 "/releases/download/v" version "/"
60 "greenisland-" version ".tar.xz"))
63 "1flmha31hmii6m2mdvmn1q5dc0fhnvgc4lp1b4wgkz20y7x4f1fm"))))
64 (build-system cmake-build-system)
66 `(("extra-cmake-modules" ,extra-cmake-modules)
68 ("glib:bin" ,glib "bin")
69 ("pkg-config" ,pkg-config)
70 ("xorg-server" ,xorg-server)))
72 `(("elogind" ,elogind)
74 ("fontconfig" ,fontconfig)
75 ("freetype" ,freetype)
78 ("libinput" ,libinput-minimal)
79 ("libxcursor" ,libxcursor)
80 ("libxkbcommon" ,libxkbcommon)
84 ("qtdeclarative" ,qtdeclarative)
86 ("wayland-protocols" ,wayland-protocols)
87 ("xcb-util-cursor" ,xcb-util-cursor)))
90 (list (string-append "-DPLUGIN_INSTALL_DIR="
91 (assoc-ref %outputs "out") "/plugins")
92 (string-append "-DQML_INSTALL_DIR="
93 (assoc-ref %outputs "out") "/qml"))
94 #:modules ((guix build cmake-build-system)
97 #:imported-modules (,@%cmake-build-system-modules
98 (guix build qt-utils))
100 (modify-phases %standard-phases
101 (add-after 'unpack 'disable-udev-tests
102 (lambda _ ; FIXME: Build env doesn't contain /dev/sda
103 (substitute* "tests/auto/platform/tst_udev.cpp"
104 (("QVERIFY") "// QVERIFY")
105 (("QCOMPARE") "// QCOMPARE"))))
108 (setenv "DBUS_FATAL_WARNINGS" "0")
109 (zero? (system* "dbus-launch" "ctest" "."))))
110 (add-before 'check 'check-setup
112 (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
113 ;; make Qt render "offscreen", required for tests
114 (setenv "QT_QPA_PLATFORM" "offscreen")
115 (setenv "XDG_RUNTIME_DIR" (getcwd))
117 (add-after 'install 'wrap-programs
118 (lambda* (#:key outputs #:allow-other-keys)
119 (let ((out (assoc-ref outputs "out")))
120 (wrap-qt-program out "greenisland")
121 (wrap-qt-program out "greenisland-launcher")
122 (wrap-qt-program out "greenisland-screencaster")
123 (wrap-qt-program out "greenisland-wayland-scanner")
125 (synopsis "QtQuick Wayland compositor and shell for desktop and mobile")
126 (description "Green Island provides a full blown Wayland compositor for
127 QtQuick as well as pluggable hardware abstraction, extensions, tools and a
128 Qt-style API for Wayland clients.")
129 (home-page "http://hawaiios.org")
130 ;; Choice of license at the user's opinion.
131 (license (list license:gpl2 license:gpl3 license:lgpl2.1 license:lgpl3))))
140 "https://github.com/sddm/sddm"
141 "/releases/download/v" version "/"
142 "sddm-" version ".tar.xz"))
145 "0fwf1wsdak5yglykfyq4wbx9g9gi079n8ncjrdynz17hwwiql4z9"))))
146 (build-system cmake-build-system)
148 `(("extra-cmake-modules" ,extra-cmake-modules)
149 ("pkg-config" ,pkg-config)
150 ("qttools" ,qttools)))
152 `(("elogind" ,elogind)
155 ("libxkbcommon" ,libxkbcommon)
156 ("linux-pam" ,linux-pam)
158 ("qtdeclarative" ,qtdeclarative)
160 ("wayland" ,wayland)))
164 ;; Currently doesn't do anything
165 ;; Option added by enable wayland greeters PR
166 "-DENABLE_WAYLAND=ON"
168 ;; Both flags are required for elogind support.
169 "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
170 "-DCONFIG_FILE=/etc/sddm.conf"
171 ;; Set path to /etc/login.defs
172 ;; Alternatively use -DUID_MIN and -DUID_MAX
173 (string-append "-DLOGIN_DEFS_PATH="
174 (assoc-ref %build-inputs "shadow")
176 (string-append "-DQT_IMPORTS_DIR="
177 (assoc-ref %outputs "out") "/qml")
178 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
179 (assoc-ref %outputs "out") "/etc"))
180 #:modules ((guix build cmake-build-system)
181 (guix build qt-utils)
183 #:imported-modules (,@%cmake-build-system-modules
184 (guix build qt-utils))
186 (modify-phases %standard-phases
187 (add-after 'unpack 'embed-loginctl-reference
189 (substitute* "CMakeLists.txt"
190 (("/usr/bin/loginctl") (which "loginctl")))
192 (add-before 'configure 'fix-qml-include
194 ;; Make sure QtQml is found when building the helper.
195 ;; See <https://github.com/sddm/sddm/pull/918>.
196 (substitute* "src/helper/CMakeLists.txt"
197 (("target_link_libraries\\(sddm-helper")
198 "target_link_libraries(sddm-helper Qt5::Qml"))
200 (add-after 'install 'wrap-programs
201 (lambda* (#:key outputs #:allow-other-keys)
202 (let ((out (assoc-ref outputs "out")))
203 (wrap-qt-program out "sddm")
204 (wrap-qt-program out "sddm-greeter")
206 (synopsis "QML based X11 and Wayland display manager")
207 (description "SDDM is a display manager for X11 and Wayland aiming to be
208 fast, simple and beautiful. SDDM is themeable and puts no restrictions on the
209 user interface design. It uses QtQuick which gives the designer the ability to
210 create smooth, animated user interfaces.")
211 (home-page "https://github.com/sddm/sddm")
212 ;; QML files are MIT licensed and images are CC BY 3.0.
213 (license (list license:gpl2+ license:expat license:cc-by3.0))))
215 (define-public lightdm
221 (uri (string-append "https://launchpad.net/lightdm/"
222 (version-major+minor version) "/"
223 version "/+download/lightdm-"
227 "0a5bvfl2h7r873al6q7c819h0kg564k9fh51rl6489z6lyvazfg4"))))
228 (build-system gnu-build-system)
230 '(#:parallel-tests? #f ; fails when run in parallel
232 (list "--localstatedir=/var")
234 (modify-phases %standard-phases
235 (add-after 'unpack 'fix-paths
237 (substitute* "src/shared-data-manager.c"
238 (("/bin/rm") (which "rm")))
239 (substitute* '("data/users.conf"
240 "common/user-list.c")
241 (("/bin/false") (which "false"))
242 (("/usr/sbin/nologin") (which "nologin")))
243 (substitute* "src/seat.c"
244 (("/bin/sh") (which "sh")))
246 (add-after 'unpack 'disable-broken-tests
248 (substitute* "tests/Makefile.in"
249 (("test-sessions-gobject ") "")
250 ((" test-sessions-python ") " "))
252 (add-before 'check 'pre-check
253 ;; Run test-suite under a dbus session.
254 (lambda* (#:key inputs #:allow-other-keys)
255 (wrap-program "tests/src/test-python-greeter"
256 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
257 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
259 ;; Avoid printing locale warnings, which trip up the text
265 ("linux-pam" ,linux-pam)
266 ("util-linux" ,util-linux) ; for sbin/nologin
267 ("libgcrypt" ,libgcrypt)
270 `(("gobject-introspection" ,gobject-introspection)
271 ("pkg-config" ,pkg-config)
273 ("intltool" ,intltool)
277 ("python-pygobject" ,python2-pygobject)))
278 ;; Required by liblightdm-gobject-1.pc.
282 ("libxklavier" ,libxklavier)))
283 (home-page "https://www.freedesktop.org/wiki/Software/LightDM/")
284 (synopsis "Lightweight display manager")
285 (description "The Light Display Manager (LightDM) is a cross-desktop
286 display manager which supports different greeters.")
287 (license license:gpl3+)))
289 (define-public lightdm-gtk-greeter
291 (name "lightdm-gtk-greeter")
296 "https://launchpad.net/lightdm-gtk-greeter/"
297 (version-major+minor version) "/" version
298 "/+download/lightdm-gtk-greeter-" version ".tar.gz"))
301 "1436sdm83xqhxyr1rzqxhsl8if2xmidlvb341xcv6dv83lyxkrlf"))))
302 (build-system gnu-build-system)
305 ("intltool" ,intltool)
306 ("pkg-config" ,pkg-config)))
308 `(("lightdm" ,lightdm)
310 (synopsis "GTK+ greeter for LightDM")
311 (home-page "https://launchpad.net/lightdm-gtk-greeter")
312 (description "This package provides a LightDM greeter implementation using
313 GTK+, lets you select a desktop session and log in to it.")
314 (license license:gpl3+)))
322 ;; Used to be available from download.berlios.de.
324 "mirror://sourceforge/slim.berlios/slim-"
327 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
328 (patches (search-patches "slim-config.patch"
332 "slim-sigusr1.patch"))))
333 (build-system cmake-build-system)
334 (inputs `(("linux-pam" ,linux-pam)
337 ("freeglut" ,freeglut)
338 ("libxrandr" ,libxrandr)
339 ("libxrender" ,libxrender)
340 ("freetype" ,freetype)
341 ("fontconfig" ,fontconfig)
347 `(("pkg-config" ,pkg-config)))
350 (modify-phases %standard-phases
351 (add-before 'configure 'set-new-etc-location
353 (substitute* "CMakeLists.txt"
355 (string-append (assoc-ref %outputs "out") "/etc"))
356 (("install.*systemd.*")
357 ;; The build system's logic here is: if "Linux", then
358 ;; "systemd". Strip that.
361 #:configure-flags '("-DUSE_PAM=yes"
362 "-DUSE_CONSOLEKIT=no")
365 ;; This used to be at <http://slim.berlios.de/>.
366 (home-page "https://sourceforge.net/projects/slim.berlios/")
367 (synopsis "Desktop-independent graphical login manager for X11")
369 "SLiM is a Desktop-independent graphical login manager for X11, derived
370 from Login.app. It aims to be light and simple, although completely
371 configurable through themes and an option file; is suitable for machines on
372 which remote login functionalities are not needed.
374 Features included: PNG and XFT support for alpha transparency and antialiased
375 fonts, External themes support, Configurable runtime options: X server --
376 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
377 input control, Can load predefined user at startup, Configurable welcome /
378 shutdown messages, Random theme selection.")
379 (license license:gpl2)))