Commit | Line | Data |
---|---|---|
4aa0891c | 1 | ;;; GNU Guix --- Functional package management for GNU |
822efdff | 2 | ;;; Copyright © 2013 Joshua Grant <tadni@riseup.net> |
16686a90 | 3 | ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> |
06ed5982 | 4 | ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr> |
4606f3a3 RW |
5 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
6 | ;;; Copyright © 2017 Sou Bunnbu <iyzsong@gmail.com> | |
4aa0891c JG |
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 | ||
5fd66a37 | 23 | (define-module (gnu packages display-managers) |
99c53e22 | 24 | #:use-module ((guix licenses) #:prefix license:) |
4aa0891c JG |
25 | #:use-module (guix packages) |
26 | #:use-module (guix download) | |
27 | #:use-module (guix build-system cmake) | |
4606f3a3 | 28 | #:use-module (guix build-system gnu) |
4aa0891c | 29 | #:use-module (guix packages) |
4606f3a3 | 30 | #:use-module (guix utils) |
16686a90 | 31 | #:use-module (gnu packages) |
15791fa5 | 32 | #:use-module (gnu packages admin) |
901385ca DC |
33 | #:use-module (gnu packages fontutils) |
34 | #:use-module (gnu packages freedesktop) | |
4aa0891c | 35 | #:use-module (gnu packages gl) |
901385ca | 36 | #:use-module (gnu packages glib) |
4606f3a3 RW |
37 | #:use-module (gnu packages gnome) |
38 | #:use-module (gnu packages gnupg) | |
c0326ebc | 39 | #:use-module (gnu packages gtk) |
e55354b8 | 40 | #:use-module (gnu packages image) |
901385ca DC |
41 | #:use-module (gnu packages kde-frameworks) |
42 | #:use-module (gnu packages linux) | |
4aa0891c | 43 | #:use-module (gnu packages pkg-config) |
4606f3a3 | 44 | #:use-module (gnu packages python) |
901385ca DC |
45 | #:use-module (gnu packages qt) |
46 | #:use-module (gnu packages xdisorg) | |
c0326ebc | 47 | #:use-module (gnu packages xfce) |
901385ca DC |
48 | #:use-module (gnu packages xorg)) |
49 | ||
50 | (define-public greenisland | |
51 | (package | |
52 | (name "greenisland") | |
d3d92ec2 | 53 | (version "0.9.0.1") |
901385ca DC |
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 | |
d3d92ec2 | 62 | "1flmha31hmii6m2mdvmn1q5dc0fhnvgc4lp1b4wgkz20y7x4f1fm")))) |
901385ca DC |
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 | |
94e24d81 | 112 | ;; make Qt render "offscreen", required for tests |
901385ca DC |
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)))) | |
4aa0891c | 131 | |
15791fa5 DC |
132 | (define-public sddm |
133 | (package | |
134 | (name "sddm") | |
fa9f5222 | 135 | (version "0.15.0") |
15791fa5 DC |
136 | (source (origin |
137 | (method url-fetch) | |
138 | (uri (string-append | |
139 | "https://github.com/sddm/sddm" | |
140 | "/releases/download/v" version "/" | |
fa9f5222 | 141 | "sddm-" version ".tar.gz")) |
15791fa5 DC |
142 | (sha256 |
143 | (base32 | |
fa9f5222 | 144 | "0x1igkjm3k8q26xbmg0qah1fc2pn2sfc675w0xg42x7ncrdiw8d4")))) |
15791fa5 DC |
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 | |
fa9f5222 MB |
151 | `(("elogind" ,elogind) |
152 | ("glib" ,glib) | |
15791fa5 DC |
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" | |
fa9f5222 MB |
167 | ;; Both flags are required for elogind support. |
168 | "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON" | |
15791fa5 DC |
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 | |
fa9f5222 MB |
186 | (add-after 'unpack 'embed-loginctl-reference |
187 | (lambda _ | |
188 | (substitute* "CMakeLists.txt" | |
189 | (("/usr/bin/loginctl") (which "loginctl"))) | |
190 | #t)) | |
15791fa5 DC |
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 | ||
4606f3a3 RW |
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 | ||
c0326ebc SB |
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 | ||
4aa0891c JG |
307 | (define-public slim |
308 | (package | |
309 | (name "slim") | |
16686a90 | 310 | (version "1.3.6") |
4aa0891c JG |
311 | (source (origin |
312 | (method url-fetch) | |
d8c19441 LC |
313 | ;; Used to be available from download.berlios.de. |
314 | (uri (string-append | |
0f971a04 | 315 | "mirror://sourceforge/slim.berlios/slim-" |
d8c19441 | 316 | version ".tar.gz")) |
4aa0891c | 317 | (sha256 |
16686a90 | 318 | (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1")) |
fc1adab1 | 319 | (patches (search-patches "slim-config.patch" |
0b71c15c | 320 | "slim-reset.patch" |
17d50dfd | 321 | "slim-login.patch" |
fc1adab1 AK |
322 | "slim-session.patch" |
323 | "slim-sigusr1.patch")))) | |
4aa0891c JG |
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) | |
c4c4cc05 | 333 | ("libx11" ,libx11) |
4aa0891c JG |
334 | ("libxft" ,libxft) |
335 | ("libxmu" ,libxmu) | |
336 | ("xauth" ,xauth))) | |
c4c4cc05 JD |
337 | (native-inputs |
338 | `(("pkg-config" ,pkg-config))) | |
4aa0891c | 339 | (arguments |
dc1d3cde KK |
340 | '(#:phases |
341 | (modify-phases %standard-phases | |
342 | (add-before 'configure 'set-new-etc-location | |
343 | (lambda _ | |
344 | (substitute* "CMakeLists.txt" | |
345 | (("/etc") | |
346 | (string-append (assoc-ref %outputs "out") "/etc")) | |
347 | (("install.*systemd.*") | |
348 | ;; The build system's logic here is: if "Linux", then | |
349 | ;; "systemd". Strip that. | |
350 | "")) | |
351 | #t))) | |
06ed5982 AE |
352 | #:configure-flags '("-DUSE_PAM=yes" |
353 | "-DUSE_CONSOLEKIT=no") | |
4aa0891c | 354 | #:tests? #f)) |
d8c19441 LC |
355 | |
356 | ;; This used to be at <http://slim.berlios.de/>. | |
3b3b60d0 | 357 | (home-page "https://sourceforge.net/projects/slim.berlios/") |
ae133b89 | 358 | (synopsis "Desktop-independent graphical login manager for X11") |
4aa0891c JG |
359 | (description |
360 | "SLiM is a Desktop-independent graphical login manager for X11, derived | |
ae133b89 EB |
361 | from Login.app. It aims to be light and simple, although completely |
362 | configurable through themes and an option file; is suitable for machines on | |
363 | which remote login functionalities are not needed. | |
4aa0891c | 364 | |
ae133b89 EB |
365 | Features included: PNG and XFT support for alpha transparency and antialiased |
366 | fonts, External themes support, Configurable runtime options: X server -- | |
367 | login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like) | |
368 | input control, Can load predefined user at startup, Configurable welcome / | |
e881752c | 369 | shutdown messages, Random theme selection.") |
99c53e22 | 370 | (license license:gpl2))) |