Commit | Line | Data |
---|---|---|
4aa0891c | 1 | ;;; GNU Guix --- Functional package management for GNU |
822efdff | 2 | ;;; Copyright © 2013 Joshua Grant <tadni@riseup.net> |
a14a2da5 | 3 | ;;; Copyright © 2014, 2018 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> | |
58f0a19c | 7 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> |
3b522de7 | 8 | ;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
373c5dfa | 9 | ;;; Copyright © 2020 L p R n d n <guix@lprndn.info> |
4aa0891c JG |
10 | ;;; |
11 | ;;; This file is part of GNU Guix. | |
12 | ;;; | |
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. | |
17 | ;;; | |
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. | |
22 | ;;; | |
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/>. | |
25 | ||
5fd66a37 | 26 | (define-module (gnu packages display-managers) |
99c53e22 | 27 | #:use-module ((guix licenses) #:prefix license:) |
4aa0891c JG |
28 | #:use-module (guix packages) |
29 | #:use-module (guix download) | |
30 | #:use-module (guix build-system cmake) | |
2f57e34b | 31 | #:use-module (guix build-system qt) |
4606f3a3 | 32 | #:use-module (guix build-system gnu) |
4aa0891c | 33 | #:use-module (guix packages) |
4606f3a3 | 34 | #:use-module (guix utils) |
16686a90 | 35 | #:use-module (gnu packages) |
15791fa5 | 36 | #:use-module (gnu packages admin) |
901385ca DC |
37 | #:use-module (gnu packages fontutils) |
38 | #:use-module (gnu packages freedesktop) | |
4aa0891c | 39 | #:use-module (gnu packages gl) |
901385ca | 40 | #:use-module (gnu packages glib) |
4606f3a3 RW |
41 | #:use-module (gnu packages gnome) |
42 | #:use-module (gnu packages gnupg) | |
c0326ebc | 43 | #:use-module (gnu packages gtk) |
e55354b8 | 44 | #:use-module (gnu packages image) |
901385ca DC |
45 | #:use-module (gnu packages kde-frameworks) |
46 | #:use-module (gnu packages linux) | |
4aa0891c | 47 | #:use-module (gnu packages pkg-config) |
4606f3a3 | 48 | #:use-module (gnu packages python) |
901385ca DC |
49 | #:use-module (gnu packages qt) |
50 | #:use-module (gnu packages xdisorg) | |
c0326ebc | 51 | #:use-module (gnu packages xfce) |
901385ca DC |
52 | #:use-module (gnu packages xorg)) |
53 | ||
15791fa5 DC |
54 | (define-public sddm |
55 | (package | |
56 | (name "sddm") | |
3725865f | 57 | (version "0.18.1") |
15791fa5 DC |
58 | (source (origin |
59 | (method url-fetch) | |
60 | (uri (string-append | |
61 | "https://github.com/sddm/sddm" | |
62 | "/releases/download/v" version "/" | |
bd6d0eba | 63 | "sddm-" version ".tar.xz")) |
15791fa5 DC |
64 | (sha256 |
65 | (base32 | |
3725865f | 66 | "0nilrhwlyvkngjgxfc08n73c16azgmw80pvx0a78xqww9y3hv4xh")))) |
2f57e34b | 67 | (build-system qt-build-system) |
15791fa5 DC |
68 | (native-inputs |
69 | `(("extra-cmake-modules" ,extra-cmake-modules) | |
70 | ("pkg-config" ,pkg-config) | |
71 | ("qttools" ,qttools))) | |
72 | (inputs | |
fa9f5222 MB |
73 | `(("elogind" ,elogind) |
74 | ("glib" ,glib) | |
15791fa5 DC |
75 | ("libxcb" ,libxcb) |
76 | ("libxkbcommon" ,libxkbcommon) | |
77 | ("linux-pam" ,linux-pam) | |
78 | ("qtbase" ,qtbase) | |
79 | ("qtdeclarative" ,qtdeclarative) | |
dc373013 RAM |
80 | |
81 | ;; Some user-defined themes use QtQuick components internally. Adding | |
82 | ;; QtQuick & co. here; they end up in QML2_IMPORT_PATH thanks to | |
83 | ;; 'wrap-qt-program'. | |
84 | ("qtgraphicaleffects" ,qtgraphicaleffects) | |
85 | ("qtquickcontrols" ,qtquickcontrols) | |
86 | ("qtquickcontrols2" ,qtquickcontrols2) | |
87 | ("qtsvg" ,qtsvg) | |
88 | ||
15791fa5 DC |
89 | ("shadow" ,shadow) |
90 | ("wayland" ,wayland))) | |
91 | (arguments | |
92 | `(#:configure-flags | |
93 | (list | |
28faa40c TGR |
94 | ;; This option currently does nothing, but will presumably be enabled |
95 | ;; if/when <https://github.com/sddm/sddm/pull/616> is merged. | |
15791fa5 DC |
96 | "-DENABLE_WAYLAND=ON" |
97 | "-DENABLE_PAM=ON" | |
fa9f5222 MB |
98 | ;; Both flags are required for elogind support. |
99 | "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON" | |
15791fa5 | 100 | "-DCONFIG_FILE=/etc/sddm.conf" |
28faa40c TGR |
101 | ;; Set path to /etc/login.defs. |
102 | ;; An alternative would be to use -DUID_MIN and -DUID_MAX. | |
15791fa5 DC |
103 | (string-append "-DLOGIN_DEFS_PATH=" |
104 | (assoc-ref %build-inputs "shadow") | |
105 | "/etc/login.defs") | |
106 | (string-append "-DQT_IMPORTS_DIR=" | |
8ebf4e3a | 107 | (assoc-ref %outputs "out") "/lib/qt5/qml") |
15791fa5 DC |
108 | (string-append "-DCMAKE_INSTALL_SYSCONFDIR=" |
109 | (assoc-ref %outputs "out") "/etc")) | |
15791fa5 | 110 | #:phases |
214bfb2c | 111 | (modify-phases %standard-phases |
fa9f5222 MB |
112 | (add-after 'unpack 'embed-loginctl-reference |
113 | (lambda _ | |
114 | (substitute* "CMakeLists.txt" | |
115 | (("/usr/bin/loginctl") (which "loginctl"))) | |
2f57e34b | 116 | #t))))) |
15791fa5 DC |
117 | (synopsis "QML based X11 and Wayland display manager") |
118 | (description "SDDM is a display manager for X11 and Wayland aiming to be | |
119 | fast, simple and beautiful. SDDM is themeable and puts no restrictions on the | |
120 | user interface design. It uses QtQuick which gives the designer the ability to | |
121 | create smooth, animated user interfaces.") | |
122 | (home-page "https://github.com/sddm/sddm") | |
123 | ;; QML files are MIT licensed and images are CC BY 3.0. | |
124 | (license (list license:gpl2+ license:expat license:cc-by3.0)))) | |
125 | ||
4606f3a3 RW |
126 | (define-public lightdm |
127 | (package | |
128 | (name "lightdm") | |
373c5dfa | 129 | (version "1.30.0") |
4606f3a3 RW |
130 | (source (origin |
131 | (method url-fetch) | |
373c5dfa | 132 | (uri (string-append |
133 | "https://github.com/CanonicalLtd/lightdm/releases/download/" | |
134 | version "/lightdm-" version ".tar.xz")) | |
4606f3a3 RW |
135 | (sha256 |
136 | (base32 | |
373c5dfa | 137 | "158zb2d0v1309a8v19hh32y4yj3v6yg4yg6m0l7v59d3a2b7f651")))) |
4606f3a3 RW |
138 | (build-system gnu-build-system) |
139 | (arguments | |
140 | '(#:parallel-tests? #f ; fails when run in parallel | |
141 | #:configure-flags | |
142 | (list "--localstatedir=/var") | |
143 | #:phases | |
144 | (modify-phases %standard-phases | |
145 | (add-after 'unpack 'fix-paths | |
146 | (lambda _ | |
147 | (substitute* "src/shared-data-manager.c" | |
148 | (("/bin/rm") (which "rm"))) | |
149 | (substitute* '("data/users.conf" | |
150 | "common/user-list.c") | |
151 | (("/bin/false") (which "false")) | |
152 | (("/usr/sbin/nologin") (which "nologin"))) | |
153 | (substitute* "src/seat.c" | |
154 | (("/bin/sh") (which "sh"))) | |
155 | #t)) | |
4606f3a3 RW |
156 | (add-before 'check 'pre-check |
157 | ;; Run test-suite under a dbus session. | |
158 | (lambda* (#:key inputs #:allow-other-keys) | |
159 | (wrap-program "tests/src/test-python-greeter" | |
160 | `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))) | |
161 | `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))) | |
162 | ||
163 | ;; Avoid printing locale warnings, which trip up the text | |
164 | ;; matching tests. | |
165 | (unsetenv "LC_ALL") | |
166 | #t))))) | |
167 | (inputs | |
168 | `(("audit" ,audit) | |
169 | ("linux-pam" ,linux-pam) | |
a14a2da5 | 170 | ("shadow" ,shadow) ;for sbin/nologin |
4606f3a3 RW |
171 | ("libgcrypt" ,libgcrypt) |
172 | ("libxcb" ,libxcb))) | |
173 | (native-inputs | |
174 | `(("gobject-introspection" ,gobject-introspection) | |
175 | ("pkg-config" ,pkg-config) | |
176 | ("itstool" ,itstool) | |
177 | ("intltool" ,intltool) | |
0097e931 | 178 | ("vala" ,vala) ;for Vala bindings |
4606f3a3 RW |
179 | ;; For tests |
180 | ("dbus" ,dbus) | |
181 | ("python" ,python-2) | |
182 | ("python-pygobject" ,python2-pygobject))) | |
183 | ;; Required by liblightdm-gobject-1.pc. | |
184 | (propagated-inputs | |
185 | `(("glib" ,glib) | |
186 | ("libx11" ,libx11) | |
187 | ("libxklavier" ,libxklavier))) | |
188 | (home-page "https://www.freedesktop.org/wiki/Software/LightDM/") | |
189 | (synopsis "Lightweight display manager") | |
190 | (description "The Light Display Manager (LightDM) is a cross-desktop | |
191 | display manager which supports different greeters.") | |
192 | (license license:gpl3+))) | |
193 | ||
c0326ebc SB |
194 | (define-public lightdm-gtk-greeter |
195 | (package | |
196 | (name "lightdm-gtk-greeter") | |
3b522de7 | 197 | (version "2.0.7") |
c0326ebc SB |
198 | (source (origin |
199 | (method url-fetch) | |
200 | (uri (string-append | |
201 | "https://launchpad.net/lightdm-gtk-greeter/" | |
202 | (version-major+minor version) "/" version | |
203 | "/+download/lightdm-gtk-greeter-" version ".tar.gz")) | |
204 | (sha256 | |
205 | (base32 | |
3b522de7 | 206 | "1g7wc3d3vqfa7mrdhx1w9ywydgjbffla6rbrxq9k3sc62br97qms")))) |
c0326ebc | 207 | (build-system gnu-build-system) |
4e639698 | 208 | (arguments |
209 | `(#:configure-flags | |
210 | (list (string-append "--enable-at-spi-command=" | |
211 | (assoc-ref %build-inputs "at-spi2-core") | |
13b01275 | 212 | "/libexec/at-spi-bus-launcher")) |
213 | #:phases | |
214 | (modify-phases %standard-phases | |
215 | (add-after 'install 'fix-.desktop-file | |
216 | (lambda* (#:key outputs #:allow-other-keys) | |
217 | (let ((out (assoc-ref outputs "out"))) | |
218 | (substitute* (string-append | |
219 | out "/share/xgreeters/lightdm-gtk-greeter.desktop") | |
220 | (("Exec=lightdm-gtk-greeter") | |
221 | (string-append "Exec=" out "/sbin/lightdm-gtk-greeter"))) | |
bed695aa | 222 | #t))) |
223 | (add-after 'fix-.desktop-file 'wrap-program | |
224 | ;; Mimic glib-or-gtk build system | |
225 | ;; which doesn't wrap files in /sbin | |
226 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
227 | (let ((gtk (assoc-ref inputs "gtk+"))) | |
228 | (wrap-program (string-append (assoc-ref outputs "out") | |
229 | "/sbin/lightdm-gtk-greeter") | |
230 | `("XDG_DATA_DIRS" ":" prefix | |
231 | ,(cons "/run/current-system/profile/share" | |
232 | (map (lambda (pkg) | |
233 | (string-append (assoc-ref inputs pkg) "/share")) | |
234 | '("gtk+" "shared-mime-info" "glib")))) | |
235 | `("GTK_PATH" ":" prefix (,gtk)) | |
236 | `("GIO_EXTRA_MODULES" ":" prefix (,gtk)))) | |
237 | #t))))) | |
c0326ebc SB |
238 | (native-inputs |
239 | `(("exo" ,exo) | |
240 | ("intltool" ,intltool) | |
241 | ("pkg-config" ,pkg-config))) | |
242 | (inputs | |
243 | `(("lightdm" ,lightdm) | |
bed695aa | 244 | ("shared-mime-info" ,shared-mime-info) |
4e639698 | 245 | ("at-spi2-core" ,at-spi2-core) |
c0326ebc SB |
246 | ("gtk+" ,gtk+))) |
247 | (synopsis "GTK+ greeter for LightDM") | |
248 | (home-page "https://launchpad.net/lightdm-gtk-greeter") | |
249 | (description "This package provides a LightDM greeter implementation using | |
250 | GTK+, lets you select a desktop session and log in to it.") | |
251 | (license license:gpl3+))) | |
252 | ||
4aa0891c JG |
253 | (define-public slim |
254 | (package | |
255 | (name "slim") | |
16686a90 | 256 | (version "1.3.6") |
4aa0891c JG |
257 | (source (origin |
258 | (method url-fetch) | |
d8c19441 LC |
259 | ;; Used to be available from download.berlios.de. |
260 | (uri (string-append | |
0f971a04 | 261 | "mirror://sourceforge/slim.berlios/slim-" |
d8c19441 | 262 | version ".tar.gz")) |
4aa0891c | 263 | (sha256 |
16686a90 | 264 | (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1")) |
fc1adab1 | 265 | (patches (search-patches "slim-config.patch" |
0b71c15c | 266 | "slim-reset.patch" |
17d50dfd | 267 | "slim-login.patch" |
fc1adab1 | 268 | "slim-session.patch" |
6426a8fb DNB |
269 | "slim-sigusr1.patch" |
270 | "slim-display.patch")))) | |
4aa0891c JG |
271 | (build-system cmake-build-system) |
272 | (inputs `(("linux-pam" ,linux-pam) | |
273 | ("libpng" ,libpng) | |
4bd428a7 | 274 | ("libjpeg" ,libjpeg-turbo) |
4aa0891c JG |
275 | ("freeglut" ,freeglut) |
276 | ("libxrandr" ,libxrandr) | |
277 | ("libxrender" ,libxrender) | |
278 | ("freetype" ,freetype) | |
279 | ("fontconfig" ,fontconfig) | |
c4c4cc05 | 280 | ("libx11" ,libx11) |
4aa0891c JG |
281 | ("libxft" ,libxft) |
282 | ("libxmu" ,libxmu) | |
283 | ("xauth" ,xauth))) | |
c4c4cc05 JD |
284 | (native-inputs |
285 | `(("pkg-config" ,pkg-config))) | |
4aa0891c | 286 | (arguments |
dc1d3cde KK |
287 | '(#:phases |
288 | (modify-phases %standard-phases | |
289 | (add-before 'configure 'set-new-etc-location | |
290 | (lambda _ | |
291 | (substitute* "CMakeLists.txt" | |
292 | (("/etc") | |
293 | (string-append (assoc-ref %outputs "out") "/etc")) | |
294 | (("install.*systemd.*") | |
295 | ;; The build system's logic here is: if "Linux", then | |
296 | ;; "systemd". Strip that. | |
297 | "")) | |
298 | #t))) | |
06ed5982 AE |
299 | #:configure-flags '("-DUSE_PAM=yes" |
300 | "-DUSE_CONSOLEKIT=no") | |
4aa0891c | 301 | #:tests? #f)) |
d8c19441 LC |
302 | |
303 | ;; This used to be at <http://slim.berlios.de/>. | |
3b3b60d0 | 304 | (home-page "https://sourceforge.net/projects/slim.berlios/") |
ae133b89 | 305 | (synopsis "Desktop-independent graphical login manager for X11") |
4aa0891c JG |
306 | (description |
307 | "SLiM is a Desktop-independent graphical login manager for X11, derived | |
ae133b89 EB |
308 | from Login.app. It aims to be light and simple, although completely |
309 | configurable through themes and an option file; is suitable for machines on | |
310 | which remote login functionalities are not needed. | |
4aa0891c | 311 | |
ae133b89 EB |
312 | Features included: PNG and XFT support for alpha transparency and antialiased |
313 | fonts, External themes support, Configurable runtime options: X server -- | |
314 | login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like) | |
315 | input control, Can load predefined user at startup, Configurable welcome / | |
e881752c | 316 | shutdown messages, Random theme selection.") |
99c53e22 | 317 | (license license:gpl2))) |