projects/guix·blob ruby-team · refs

856 lines · 35.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Joshua Grant <[email protected]>
3;;; Copyright © 2014, 2018, 2022 Ludovic Courtès <[email protected]>
4;;; Copyright © 2014 Andreas Enge <[email protected]>
5;;; Copyright © 2017 Ricardo Wurmus <[email protected]>
6;;; Copyright © 2017 Sou Bunnbu <[email protected]>
7;;; Copyright © 2017 Marius Bakke <[email protected]>
8;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <[email protected]>
9;;; Copyright © 2020 L p R n d n <[email protected]>
10;;; Copyright © 2020, 2024 Fredrik Salomonsson <[email protected]>
11;;; Copyright © 2020 Vincent Legoll <[email protected]>
12;;; Copyright © 2021 Zheng Junjie <[email protected]>
13;;; Copyright © 2021-2023 Efraim Flashner <[email protected]>
14;;; Copyright © 2021 Petr Hodina <[email protected]>
15;;; Copyright © 2022, 2023 Maxim Cournoyer <[email protected]>
16;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
17;;; Copyright © 2026 Anderson Torres <[email protected]>
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages display-managers)
35 #:use-module (guix deprecation)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix download)
39 #:use-module (guix git-download)
40 #:use-module (guix build-system cmake)
41 #:use-module (guix build-system copy)
42 #:use-module (guix build-system go)
43 #:use-module (guix build-system qt)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system glib-or-gtk)
46 #:use-module (guix build-system trivial)
47 #:use-module (guix packages)
48 #:use-module (guix utils)
49 #:use-module (guix gexp)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages admin)
53 #:use-module (gnu packages base)
54 #:use-module (gnu packages bash)
55 #:use-module (gnu packages crypto)
56 #:use-module (gnu packages fontutils)
57 #:use-module (gnu packages freedesktop)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages gnupg)
62 #:use-module (gnu packages golang-xyz)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages kde-frameworks)
67 #:use-module (gnu packages linux)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages qt)
71 #:use-module (gnu packages xdisorg)
72 #:use-module (gnu packages xfce)
73 #:use-module (gnu packages xorg)
74 #:export (customize-lightdm-tiny-greeter))
75
76(define-public emptty
77 (package
78 (name "emptty")
79 (version "0.16.1")
80 (source
81 (origin
82 (method git-fetch)
83 (uri (git-reference
84 (url "https://github.com/tvrzna/emptty")
85 (commit (string-append "v" version))))
86 (file-name (git-file-name name version))
87 (sha256
88 (base32 "0rvqvgkjjxbcskczfmjlmlyn9y3xcrz4g0sg5v76hbqx7ilwc18k"))))
89 (build-system go-build-system)
90 (arguments
91 (list
92 #:install-source? #f
93 #:import-path "github.com/tvrzna/emptty"
94 #:phases
95 #~(modify-phases %standard-phases
96 (add-after 'unpack 'patch-paths
97 (lambda* (#:key inputs import-path #:allow-other-keys)
98 (with-directory-excursion (string-append "src/" import-path)
99 (substitute* "src/session_xorg.go"
100 (("/usr/bin/mcookie")
101 (search-input-file inputs "bin/mcookie"))
102 (("/usr/bin/xauth")
103 (search-input-file inputs "bin/xauth"))
104 (("/usr/bin/Xorg")
105 (search-input-file inputs "bin/Xorg")))))))))
106 (native-inputs
107 (list go-github-com-msteinert-pam-v2))
108 (inputs
109 (list libx11
110 linux-pam
111 util-linux
112 xauth
113 xorg-server))
114 (home-page "https://github.com/tvrzna/emptty")
115 (synopsis "@acronym{CLI, command line interface} display manager")
116 (description
117 "This package provides @code{emptty}, a dead simple @acronym{CLI, command
118line interface} Display Manager on the TTY.")
119 (license license:expat)))
120
121(define-public sddm
122 (package
123 (name "sddm")
124 (version "0.21.0")
125 (source (origin
126 (method git-fetch)
127 (uri (git-reference
128 (url "https://github.com/sddm/sddm")
129 (commit (string-append "v" version))))
130 (file-name (git-file-name name version))
131 (sha256
132 (base32
133 "0mxrh0z9x4r4bli25g746n66adwnf3r42lzq0yssc50v9y7fc1a1"))))
134 (build-system qt-build-system)
135 (native-inputs
136 (list extra-cmake-modules pkg-config qttools))
137 (inputs
138 (list elogind
139 glib
140 libxcb
141 libxkbcommon
142 linux-pam
143 qtdeclarative
144 qtsvg
145 shadow
146 wayland
147 qtwayland
148 qtbase
149 xsetroot))
150 (arguments
151 (let* ((qtbase (this-package-input "qtbase"))
152 (qt6? (string= "6" (version-major (package-version qtbase)))))
153 (list
154 #:qtbase qtbase
155 #:configure-flags
156 #~(list
157 #$@(if qt6?
158 #~("-DBUILD_WITH_QT6=ON")
159 #~())
160 "-DENABLE_WAYLAND=ON"
161 "-DENABLE_PAM=ON"
162 ;; PAM is configured by pam service.
163 "-DINSTALL_PAM_CONFIGURATION=OFF"
164 ;; Both flags are required for elogind support.
165 "-DNO_SYSTEMD=ON"
166 "-DUSE_ELOGIND=ON"
167 "-DCONFIG_FILE=/etc/sddm.conf"
168 ;; Set path to /etc/login.defs.
169 ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
170 (string-append "-DLOGIN_DEFS_PATH="
171 #$(this-package-input "shadow")
172 "/etc/login.defs")
173 (string-append
174 "-DCMAKE_CXX_FLAGS=-I"
175 #$(this-package-input "qtdeclarative") "/include/qt" #$(if qt6? "6" "5"))
176 (string-append "-DQT_IMPORTS_DIR="
177 #$output "/lib/qt" #$(if qt6? "6" "5") "/qml")
178 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
179 #$output "/etc"))
180 #:phases
181 #~(modify-phases %standard-phases
182 (add-after 'unpack 'embed-loginctl-reference
183 (lambda _
184 (substitute* "CMakeLists.txt"
185 (("/usr/bin/loginctl")
186 (which "loginctl")))))
187 (add-after 'unpack 'embed-xsetroot-reference
188 (lambda* (#:key inputs #:allow-other-keys)
189 (substitute* '("src/daemon/XorgDisplayServer.cpp"
190 "src/helper/xorguserhelper.cpp")
191 (("xsetroot")
192 (search-input-file inputs "/bin/xsetroot")))))
193 #$@(if qt6?
194 #~((add-after 'unpack 'fix-QML_IMPORT_PATH
195 (lambda _
196 (substitute* "src/daemon/Greeter.cpp"
197 (("QML2_IMPORT_PATH")
198 "QML_IMPORT_PATH")))))
199 #~())))))
200 (synopsis "QML based X11 and Wayland display manager")
201 (description "SDDM is a display manager for X11 and Wayland aiming to be
202fast, simple and beautiful. SDDM is themeable and puts no restrictions on the
203user interface design. It uses QtQuick which gives the designer the ability
204to create smooth, animated user interfaces.")
205 (home-page "https://github.com/sddm/sddm")
206 ;; QML files are MIT licensed and images are CC BY 3.0.
207 (license (list license:gpl2+ license:expat license:cc-by3.0))))
208
209(define-public sddm-qt5
210 (package
211 (inherit sddm)
212 (name "sddm-qt5")
213 (native-inputs (modify-inputs native-inputs
214 (replace "qttools" qttools-5)))
215 (inputs (modify-inputs inputs
216 (replace "qtbase" qtbase-5)
217 (replace "qtsvg" qtsvg-5)
218 (replace "qtdeclarative" qtdeclarative-5)
219 (replace "qtwayland" qtwayland-5)
220 (append qtgraphicaleffects qtquickcontrols-5 qtquickcontrols2-5)))))
221
222(define-public abstractdark-sddm-theme-qt5
223 (let ((commit "e817d4b27981080cd3b398fe928619ffa16c52e7")
224 (revision "0"))
225 (package
226 (name "abstractdark-sddm-theme-qt5")
227 (version (git-version "0.0.0" revision commit))
228 (source (origin
229 (method git-fetch)
230 (uri (git-reference
231 (url "https://github.com/3ximus/abstractdark-sddm-theme")
232 (commit commit)))
233 (file-name (git-file-name name version))
234 (sha256
235 (base32
236 "1si141hnp4lr43q36mbl3anlx0a81r8nqlahz3n3l7zmrxb56s2y"))))
237 (build-system copy-build-system)
238 (arguments
239 `(#:install-plan '(("." "/share/sddm/themes/abstractdark"))))
240 (home-page "https://github.com/3ximus/abstractdark-sddm-theme")
241 (synopsis "Abstract Dark theme for SDDM")
242 (description
243 "This package provides a minimalistic dark theme for SDDM, black
244background with abstract shapes. Inspired by solarized-sddm-theme.")
245 (license license:gpl3+))))
246
247;; TODO: Remove after 2027-01.
248(define-deprecated-package abstractdark-sddm-theme abstractdark-sddm-theme-qt5)
249
250(define-public dexy-color-sddm-theme-qt5
251 ;; No upstream releases or tags
252 (let ((commit "4785d3b80d725cf55cecd7b27181f77151c4e3e2")
253 (revision "0"))
254 (package
255 (name "dexy-color-sddm-theme-qt5")
256 (version (git-version "0.0.0" revision commit))
257 (source (origin
258 (method git-fetch)
259 (uri (git-reference
260 (url "https://github.com/L4ki/Dexy-Plasma-Themes")
261 (commit commit)))
262 (file-name (git-file-name name version))
263 (sha256
264 (base32
265 "14fzc4kq50ii1qmmvnp9gxig504zfx1rsfsp0wq9bay7d72j282c"))))
266 (build-system copy-build-system)
267 (arguments
268 `(#:install-plan '(("Dexy-Color-SDDM"
269 "/share/sddm/themes/dexy-color-sddm"))))
270 (home-page "https://github.com/L4ki/Dexy-Plasma-Themes")
271 (synopsis "Dexy Color theme for SDDM")
272 (description
273 "This package provides a minimalistic and modern SDDM theme with a
274blurred background.")
275 (license license:gpl3+))))
276
277;; TODO: Remove after 2027-01.
278(define-deprecated-package dexy-color-sddm-theme dexy-color-sddm-theme-qt5)
279
280(define-public guix-simplyblack-sddm-theme
281 (package
282 (name "guix-simplyblack-sddm-theme")
283 (version "0.2")
284 (source
285 (origin
286 (method git-fetch)
287 (uri (git-reference
288 (url "https://github.com/plattfot/guix-simplyblack-sddm")
289 (commit version)))
290 (file-name (git-file-name name version))
291 (sha256
292 (base32 "09vb9b0pmyhj6fh0b6by59bykszbkdayhz678pnb4pyrdmlvv1am"))))
293 (build-system trivial-build-system)
294 (arguments
295 `(#:modules ((guix build utils))
296 #:builder (begin
297 (use-modules (guix build utils)
298 (srfi srfi-26))
299 (let* ((out (assoc-ref %outputs "out"))
300 (themes-dir (string-append out
301 "/share/sddm/themes/guix-simplyblack-sddm/")))
302 (mkdir-p themes-dir)
303 (copy-recursively (assoc-ref %build-inputs "source")
304 themes-dir)
305 (substitute* (map (cut string-append themes-dir <>)
306 '("Main.qml" "theme.conf"))
307 (("file:")
308 themes-dir))))))
309 (home-page "https://github.com/plattfot/guix-simplyblack-sddm")
310 (synopsis "Guix based theme for SDDM")
311 (description
312 "This package provides a simple theme for SDDM, black background with
313Guix's logo. Based on Arch linux's archlinux-simplyblack theme.")
314 ;; Theme under cc-by-sa3.0, guix logo under license:cc-by-sa4.0
315 (license (list license:cc-by-sa3.0 license:cc-by-sa4.0))))
316
317(define-public guix-simplyblack-sddm-theme-qt5
318 (package
319 (inherit guix-simplyblack-sddm-theme)
320 (name "guix-simplyblack-sddm-theme-qt5")
321 (source
322 (origin
323 (inherit (package-source guix-simplyblack-sddm-theme))
324 (modules '((guix build utils)))
325 (snippet '(begin
326 (substitute* "metadata.desktop"
327 (("QtVersion=6")
328 "QtVersion=5"))))))))
329
330(define-public chili-sddm-theme-qt5
331 (package
332 (name "chili-sddm-theme-qt5")
333 (version "0.1.5")
334 (source (origin
335 (method git-fetch)
336 (uri (git-reference
337 (url "https://github.com/MarianArlt/sddm-chili")
338 (commit version)))
339 (file-name (git-file-name name version))
340 (sha256
341 (base32
342 "036fxsa7m8ymmp3p40z671z163y6fcsa9a641lrxdrw225ssq5f3"))))
343 (build-system trivial-build-system)
344 (arguments
345 `(#:modules ((guix build utils))
346 #:builder
347 (begin
348 (use-modules (guix build utils))
349 (let* ((out (assoc-ref %outputs "out"))
350 (sddm-themes (string-append out "/share/sddm/themes")))
351 (mkdir-p sddm-themes)
352 (copy-recursively (assoc-ref %build-inputs "source")
353 (string-append sddm-themes "/chili"))))))
354 (home-page "https://github.com/MarianArlt/sddm-chili")
355 (synopsis "Chili theme for SDDM")
356 (description "Chili reduces all the clutter and leaves you with a clean,
357easy to use, login interface with a modern yet classy touch.")
358 (license license:gpl3+)))
359
360;; TODO: Remove after 2027-01.
361(define-deprecated-package chili-sddm-theme chili-sddm-theme-qt5)
362
363(define-public sugar-dark-sddm-theme-qt5
364 (package
365 (name "sugar-dark-sddm-theme-qt5")
366 (version "1.2")
367 (source (origin
368 (method git-fetch)
369 (uri (git-reference
370 (url "https://github.com/MarianArlt/sddm-sugar-dark")
371 (commit (string-append "v" version))))
372 (file-name (git-file-name name version))
373 (sha256
374 (base32
375 "0gx0am7vq1ywaw2rm1p015x90b75ccqxnb1sz3wy8yjl27v82yhb"))))
376 (build-system trivial-build-system)
377 (arguments
378 `(#:modules ((guix build utils))
379 #:builder
380 (begin
381 (use-modules (guix build utils))
382 (let* ((out (assoc-ref %outputs "out"))
383 (sddm-themes (string-append out "/share/sddm/themes")))
384 (mkdir-p sddm-themes)
385 (copy-recursively (assoc-ref %build-inputs "source")
386 (string-append sddm-themes "/sugar-dark"))))))
387 (home-page "https://github.com/MarianArlt/sddm-sugar-dark")
388 (synopsis "Sugar dark theme for SDDM")
389 (description "Sugar is extremely customizable and so sweet it will
390probably cause you diabetes just from looking at it. Sweeten the login
391experience for your users, your family and yourself")
392 (license license:gpl3+)))
393
394;; TODO: Remove after 2027-01.
395(define-deprecated-package sugar-dark-sddm-theme sugar-dark-sddm-theme-qt5)
396
397(define-public sugar-light-sddm-theme-qt5
398 (package
399 (name "sugar-light-sddm-theme-qt5")
400 (version "1.0")
401 (source (origin
402 (method git-fetch)
403 (uri (git-reference
404 (url "https://github.com/MarianArlt/sddm-sugar-light")
405 (commit (string-append "v" version))))
406 (file-name (git-file-name name version))
407 (sha256
408 (base32
409 "1sfd5bi5jcfz3hmvvr3smalywixa70g5j96qgx1220mp6rqf886k"))))
410 (build-system trivial-build-system)
411 (arguments
412 `(#:modules ((guix build utils))
413 #:builder
414 (begin
415 (use-modules (guix build utils))
416 (let* ((out (assoc-ref %outputs "out"))
417 (sddm-themes (string-append out "/share/sddm/themes")))
418 (mkdir-p sddm-themes)
419 (copy-recursively (assoc-ref %build-inputs "source")
420 (string-append sddm-themes "/sugar-light"))))))
421 (home-page "https://github.com/MarianArlt/sddm-sugar-light")
422 (synopsis "Sugar light theme for SDDM")
423 (description "Sugar is extremely customizable and so sweet it will
424probably cause you diabetes just from looking at it. Sweeten the login
425experience for your users, your family and yourself")
426 (license license:gpl3+)))
427
428;; TODO: Remove after 2027-01.
429(define-deprecated-package sugar-light-sddm-theme sugar-light-sddm-theme-qt5)
430
431(define-public where-is-my-sddm-theme
432 (package
433 (name "where-is-my-sddm-theme")
434 (version "1.12.0")
435 (source (origin
436 (method git-fetch)
437 (uri (git-reference
438 (url "https://github.com/stepanzubkov/where-is-my-sddm-theme")
439 (commit (string-append "v" version))))
440 (file-name (git-file-name name version))
441 (sha256
442 (base32
443 "0a30rlknxz855qsrc3ksyic4cj5axm6pwk5nya3nlbqjrrghy7gr"))))
444 (build-system copy-build-system)
445 (arguments
446 `(#:install-plan '(("where_is_my_sddm_theme" "/share/sddm/themes/")
447 ("where_is_my_sddm_theme_qt5" "/share/sddm/themes/"))))
448 (home-page "https://github.com/stepanzubkov/where-is-my-sddm-theme")
449 (synopsis "Minimal SDDM theme, simply a black screen and a password")
450 (description
451 "This package is a @emph{minimalist and highly customizable} SDDM theme.
452It's only a black screen and a password input field. Nothing extra, right?
453Even when you enter the wrong password it will only show a red border around
454the screen.")
455 (license license:gpl3+)))
456
457(define-public lightdm
458 (package
459 (name "lightdm")
460 (version "1.32.0")
461 (source (origin
462 (method git-fetch)
463 (uri (git-reference
464 (url "https://github.com/canonical/lightdm")
465 (commit version)))
466 (file-name (git-file-name name version))
467 (sha256
468 (base32
469 "1wr60c946p8jz9kb8zi4cd8d4mkcy7infbvlfzwajiglc22nblxn"))
470 (patches (search-patches "lightdm-arguments-ordering.patch"
471 "lightdm-vncserver-check.patch"
472 "lightdm-vnc-color-depth.patch"
473 "lightdm-vnc-ipv6.patch"))))
474 (build-system gnu-build-system)
475 (arguments
476 (list
477 #:parallel-tests? #f ; fails when run in parallel
478 #:configure-flags
479 #~(list "--localstatedir=/var"
480 "--sysconfdir=/etc"
481 "--enable-gtk-doc"
482 ;; Otherwise the test suite fails on such a warning.
483 "CFLAGS=-Wno-error=missing-prototypes")
484 #:phases
485 #~(modify-phases %standard-phases
486 (add-after 'unpack 'fix-paths
487 (lambda* (#:key inputs #:allow-other-keys)
488 (substitute* "src/shared-data-manager.c"
489 (("/bin/rm")
490 (search-input-file inputs "bin/rm")))
491 (substitute* '("data/users.conf"
492 "common/user-list.c")
493 (("/bin/false")
494 (search-input-file inputs "bin/false"))
495 (("/usr/sbin/nologin")
496 (search-input-file inputs "sbin/nologin")))
497 (substitute* "src/seat.c"
498 (("/bin/sh")
499 (search-input-file inputs "bin/sh")))))
500 (add-before 'check 'pre-check
501 (lambda _
502 (wrap-program "tests/src/test-python-greeter"
503 #:sh (which "bash")
504 `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
505 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
506 ;; Avoid printing locale warnings, which trip up the text
507 ;; matching tests.
508 (unsetenv "LC_ALL")))
509 (replace 'install
510 (lambda* (#:key make-flags #:allow-other-keys #:rest args)
511 ;; Override the sysconfdir flag only for the installation phase,
512 ;; as it attempts to write the sample config files to /etc and
513 ;; fail otherwise.
514 (define make-flags*
515 (append make-flags (list (string-append "sysconfdir="
516 #$output "/etc"))))
517 (apply (assoc-ref %standard-phases 'install)
518 (append args (list #:make-flags make-flags*))))))))
519 (inputs
520 (list audit
521 bash-minimal ;for cross-compilation
522 coreutils-minimal ;ditto
523 linux-pam
524 shadow ;for sbin/nologin
525 libgcrypt
526 libxcb
527 libxdmcp))
528 (native-inputs
529 (list accountsservice
530 autoconf
531 automake
532 gobject-introspection
533 gtk-doc/stable
534 pkg-config
535 itstool
536 intltool
537 libtool
538 vala ;for Vala bindings
539 ;; For tests
540 ;; All tests fail with dbus >= 1.15.2, see
541 ;; https://github.com/canonical/lightdm/issues/346
542 dbus-1.15.0
543 python-wrapper
544 python-pygobject-3.50
545 which
546 yelp-tools))
547 ;; Required by liblightdm-gobject-1.pc.
548 (propagated-inputs
549 (list glib libx11 libxklavier))
550 (home-page "https://www.freedesktop.org/wiki/Software/LightDM/")
551 (synopsis "Lightweight display manager")
552 (description "The Light Display Manager (LightDM) is a cross-desktop
553display manager which supports different greeters.")
554 (license license:gpl3+)))
555
556(define-public lightdm-gtk-greeter
557 (package
558 (name "lightdm-gtk-greeter")
559 (version "2.0.8")
560 (source (origin
561 (method url-fetch)
562 (uri (string-append
563 "https://github.com/xubuntu/lightdm-gtk-greeter"
564 "/releases/download/lightdm-gtk-greeter-" version "/"
565 "lightdm-gtk-greeter-" version ".tar.gz"))
566 (sha256
567 (base32
568 "04q62mvr97l9gv8h37hfarygqc7p0498ig7xclcg4kxkqw0b7yxy"))))
569 (build-system glib-or-gtk-build-system)
570 (arguments
571 (list
572 #:configure-flags
573 #~(list "--disable-indicator-services-command" ;requires upstart
574 ;; Put the binary under /bin rather than /sbin, so that it gets
575 ;; wrapped by the glib-or-gtk-wrap phase.
576 (string-append "--sbindir=" #$output "/bin")
577 (string-append "--with-libxklavier")
578 (string-append "--enable-at-spi-command="
579 (search-input-file
580 %build-inputs "libexec/at-spi-bus-launcher")
581 " --launch-immediately"))
582 #:phases
583 #~(modify-phases %standard-phases
584 (add-after 'unpack 'customize-default-config-path
585 (lambda _
586 (substitute* "src/Makefile.in"
587 ;; Have the default config directory sourced from
588 ;; /etc/lightdm/lightdm-gtk-greeter.conf, which is where the
589 ;; lightdm service writes it.
590 (("\\$\\(sysconfdir)/lightdm/lightdm-gtk-greeter.conf")
591 "/etc/lightdm/lightdm-gtk-greeter.conf"))))
592 (add-after 'install 'fix-.desktop-file
593 (lambda* (#:key outputs #:allow-other-keys)
594 (substitute* (search-input-file
595 outputs
596 "share/xgreeters/lightdm-gtk-greeter.desktop")
597 (("Exec=lightdm-gtk-greeter")
598 (string-append "Exec="
599 (search-input-file
600 outputs "bin/lightdm-gtk-greeter"))))))
601 (add-after 'glib-or-gtk-wrap 'custom-wrap
602 (lambda* (#:key outputs #:allow-other-keys)
603 (wrap-script (search-input-file
604 outputs "bin/lightdm-gtk-greeter")
605 ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is
606 ;; available at all times even outside of profiles, such as
607 ;; when used in the lightdm-service-type. Otherwise, it
608 ;; wouldn't be able to display its own icons.
609 `("GDK_PIXBUF_MODULE_FILE" =
610 (,(search-input-file
611 outputs
612 "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")))
613 `("XDG_DATA_DIRS" ":" prefix
614 (,(string-append "/run/current-system/profile/share:"
615 (getenv "XDG_DATA_DIRS"))))
616 '("XCURSOR_PATH" ":" prefix
617 ("/run/current-system/profile/share/icons"))))))))
618 (native-inputs
619 (list exo
620 intltool
621 pkg-config
622 xfce4-dev-tools))
623 (inputs
624 (list at-spi2-core
625 bash-minimal ;for wrap-program
626 gtk+
627 guile-3.0
628 (librsvg-for-system)
629 libxklavier
630 lightdm
631 shared-mime-info))
632 (synopsis "GTK+ greeter for LightDM")
633 (home-page "https://github.com/xubuntu/lightdm-gtk-greeter")
634 (description "This package provides a LightDM greeter implementation using
635GTK+, lets you select a desktop session and log in to it.")
636 (license license:gpl3+)))
637
638(define-public lightdm-mini-greeter
639 (let ((commit "ead7936993b4e9e067d73fa49dec7edfb46c73a8")
640 (revision "0"))
641 (package
642 (name "lightdm-mini-greeter")
643 ;; Version 0.5.1 release in 2021, so we use a recent commit.
644 (version (git-version "0.5.1" revision commit))
645 (source (origin
646 (method git-fetch)
647 (uri (git-reference
648 (url "https://github.com/prikhi/lightdm-mini-greeter")
649 (commit commit)))
650 (file-name (git-file-name name version))
651 (sha256
652 (base32
653 "17iy1jkllmi2xc95csb18wcfvbk44gyva2in2k5f29fy362ppz25"))))
654 (build-system glib-or-gtk-build-system)
655 (arguments
656 (list
657 #:phases
658 #~(modify-phases %standard-phases
659 (add-after 'unpack 'customize-default-config-path
660 (lambda _
661 (substitute* "Makefile.am"
662 ;; Have the default config directory sourced from
663 ;; /etc/lightdm/lightdm-mini-greeter.conf, which is where the
664 ;; lightdm service writes it.
665 (("\\$\\(sysconfdir)/lightdm/lightdm-mini-greeter.conf")
666 "/etc/lightdm/lightdm-mini-greeter.conf"))))
667 (add-after 'install 'fix-.desktop-file
668 (lambda* (#:key outputs #:allow-other-keys)
669 (substitute* (search-input-file
670 outputs
671 "share/xgreeters/lightdm-mini-greeter.desktop")
672 (("Exec=lightdm-mini-greeter")
673 (string-append "Exec="
674 (search-input-file
675 outputs "bin/lightdm-mini-greeter")))))))))
676 (native-inputs
677 (list autoconf automake pkg-config))
678 (inputs
679 (list gtk+ lightdm))
680 (synopsis "Mini Greeter for LightDM")
681 (home-page "https://github.com/prikhi/lightdm-mini-greeter")
682 (description "This package provide a minimal but highly configurable
683single-user GTK3 greeter for LightDM, this greeter is inspired by the SLiM
684Display Manager and LightDM GTK3 Greeter.")
685 (license license:gpl3))))
686
687(define-public lightdm-tiny-greeter
688 (let ((commit "6717c5853315ebd8164b1ddf85b9483f92cbcae8")
689 (revision "0"))
690 (package
691 (name "lightdm-tiny-greeter")
692 ;; Version 1.2 release in 2021, so we use a recent commit.
693 (version (git-version "1.2" revision commit))
694 (source (origin
695 (method git-fetch)
696 (uri (git-reference
697 (url "https://github.com/tobiohlala/lightdm-tiny-greeter")
698 (commit commit)))
699 (file-name (git-file-name name version))
700 (sha256
701 (base32
702 "1n970d6525fd918i1j09akxiacqbpxni8apkfi542bq5zg5crjbs"))))
703 (build-system glib-or-gtk-build-system)
704 (arguments
705 (list
706 #:tests? #f ; No test target.
707 #:phases
708 #~(modify-phases %standard-phases
709 (delete 'configure)
710 (add-after 'unpack 'patch-hardcoded-paths
711 (lambda _
712 (substitute* "Makefile"
713 (("PREFIX = /usr")
714 (string-append "PREFIX = " #$output))
715 (("/usr/share/xgreeters")
716 (string-append #$output "/share/xgreeters"))
717 (("cp lightdm-tiny-greeter")
718 "mkdir -p $(PREFIX)/bin; cp lightdm-tiny-greeter"))))
719 (add-after 'glib-or-gtk-wrap 'custom-wrap
720 (lambda _
721 (wrap-script (string-append #$output "/bin/lightdm-tiny-greeter")
722 ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is
723 ;; available at all times even outside of profiles, such as
724 ;; when used in the lightdm-service-type. Otherwise, it
725 ;; wouldn't be able to display its own icons.
726 `("GDK_PIXBUF_MODULE_FILE" =
727 (,(string-append
728 #$output
729 "/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache")))
730 `("XDG_DATA_DIRS" ":" prefix
731 (,(string-append "/run/current-system/profile/share:"
732 (getenv "XDG_DATA_DIRS"))))
733 '("XCURSOR_PATH" ":" prefix
734 ("/run/current-system/profile/share/icons")))))
735 (add-after 'install 'fix-.desktop-file
736 (lambda _
737 (substitute* (string-append
738 #$output "/share/xgreeters/lightdm-tiny-greeter.desktop")
739 (("Exec=lightdm-tiny-greeter")
740 (string-append "Exec="
741 (string-append
742 #$output "/bin/lightdm-tiny-greeter")))))))))
743 (native-inputs
744 (list pkg-config))
745 (inputs
746 (list gtk+ lightdm))
747 (synopsis "Tiny Greeter for LightDM")
748 (home-page "https://github.com/tobiohlala/lightdm-tiny-greeter")
749 (description "This package provides a tiny yet customizable GTK3 LightDM
750Greeter with focus on code and minimalism.")
751 (license license:bsd-3))))
752
753(define* (customize-lightdm-tiny-greeter #:key name session
754 user_text pass_text
755 fontname fontsize)
756 "Make a customized lightdm-tiny-greeter package which name is NAME.
757
758This function will change SESSION, USER_TEXT, PASS_TEXT, FONTNAME and FONTSIZE
759in config.h of lightdm-tiny-greeter."
760 (package
761 (inherit lightdm-tiny-greeter)
762 (name (or name (string-append
763 (package-name lightdm-tiny-greeter)
764 "-" (or session "default"))))
765 (arguments
766 (substitute-keyword-arguments
767 (package-arguments lightdm-tiny-greeter)
768 ((#:phases phases)
769 #~(modify-phases #$phases
770 (add-after 'unpack 'patch-config-h
771 (lambda _
772 (when #$user_text
773 (substitute* "config.h"
774 (("\\*user_text = .*;")
775 (string-append "*user_text = \"" #$user_text "\";"))))
776 (when #$pass_text
777 (substitute* "config.h"
778 (("\\*pass_text = .*;")
779 (string-append "*pass_text = \"" #$pass_text "\";"))))
780 (when #$session
781 (substitute* "config.h"
782 (("\\*session = .*;")
783 (string-append "*session = \"" #$session "\";"))))
784 (when #$fontname
785 (substitute* "config.h"
786 (("font: .*px .*;")
787 (string-append "font: 16px \\\"" #$fontname "\\\";"))))
788 (when #$fontsize
789 (substitute* "config.h"
790 (("font: .*px")
791 (string-append "font: " #$fontsize "px"))))))))))))
792
793(define-public slim
794 (package
795 (name "slim")
796 (version "1.4.1")
797 (source
798 (origin
799 (method url-fetch)
800 (uri (string-append "mirror://sourceforge/slim-fork/slim-" version
801 ".tar.gz"))
802 (sha256
803 (base32 "06r47ypf9lsy76jikrvihw8ka9j2wbrnn8g3sbxp819hcbqxg22z"))
804 (patches (search-patches "slim-config.patch"
805 "slim-login.patch"
806 "slim-display.patch"
807 "slim-gcc-14.patch"))))
808 (build-system cmake-build-system)
809 (inputs (list fontconfig
810 freeglut
811 freetype
812 libjpeg-turbo
813 libpng
814 libx11
815 libxcrypt
816 libxft
817 libxmu
818 libxrandr
819 libxrender
820 linux-pam
821 xauth))
822 (native-inputs (list pkg-config))
823 (arguments
824 (list
825 #:phases
826 #~(modify-phases %standard-phases
827 (add-before 'configure 'set-new-etc-location
828 (lambda _
829 (substitute* "CMakeLists.txt"
830 (("/etc")
831 (string-append #$output "/etc"))
832 (("install.*SYSTEMDDIR.*")
833 ;; The build system's logic here is: if "Linux", then
834 ;; "systemd". Strip that.
835 "")))))
836 #:configure-flags
837 #~(list "-DUSE_PAM=yes" "-DUSE_CONSOLEKIT=no")
838 #:tests? #f))
839 ;; The original project (https://github.com/iwamatsu/slim) has not been
840 ;; maintained since 2013, so we use slim-fork instead.
841 (home-page "https://slim-fork.sourceforge.io/")
842 (synopsis "Desktop-independent graphical login manager for X11")
843 (description
844 "SLiM is a Desktop-independent graphical login manager for X11, derived
845from Login.app. It aims to be light and simple, although completely
846configurable through themes and an option file; is suitable for machines on
847which remote login functionalities are not needed.
848
849Features included: PNG and XFT support for alpha transparency and antialiased
850fonts, External themes support, Configurable runtime options: X server --
851login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
852input control, Can load predefined user at startup, Configurable welcome /
853shutdown messages, Random theme selection.")
854 (license license:gpl2)))
855
856;;; display-managers.scm ends here