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