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