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