gnu: lightdm: Add vala bindings.
[jackhill/guix/guix.git] / gnu / packages / display-managers.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Joshua Grant <tadni@riseup.net>
3 ;;; Copyright © 2014, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Sou Bunnbu <iyzsong@gmail.com>
7 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
8 ;;; Copyright © 2017, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2020 L p R n d n <guix@lprndn.info>
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
26 (define-module (gnu packages display-managers)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system cmake)
31 #:use-module (guix build-system qt)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix packages)
34 #:use-module (guix utils)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages admin)
37 #:use-module (gnu packages fontutils)
38 #:use-module (gnu packages freedesktop)
39 #:use-module (gnu packages gl)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gnome)
42 #:use-module (gnu packages gnupg)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages kde-frameworks)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages python)
49 #:use-module (gnu packages qt)
50 #:use-module (gnu packages xdisorg)
51 #:use-module (gnu packages xfce)
52 #:use-module (gnu packages xorg))
53
54 (define-public sddm
55 (package
56 (name "sddm")
57 (version "0.18.1")
58 (source (origin
59 (method url-fetch)
60 (uri (string-append
61 "https://github.com/sddm/sddm"
62 "/releases/download/v" version "/"
63 "sddm-" version ".tar.xz"))
64 (sha256
65 (base32
66 "0nilrhwlyvkngjgxfc08n73c16azgmw80pvx0a78xqww9y3hv4xh"))))
67 (build-system qt-build-system)
68 (native-inputs
69 `(("extra-cmake-modules" ,extra-cmake-modules)
70 ("pkg-config" ,pkg-config)
71 ("qttools" ,qttools)))
72 (inputs
73 `(("elogind" ,elogind)
74 ("glib" ,glib)
75 ("libxcb" ,libxcb)
76 ("libxkbcommon" ,libxkbcommon)
77 ("linux-pam" ,linux-pam)
78 ("qtbase" ,qtbase)
79 ("qtdeclarative" ,qtdeclarative)
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
89 ("shadow" ,shadow)
90 ("wayland" ,wayland)))
91 (arguments
92 `(#:configure-flags
93 (list
94 ;; This option currently does nothing, but will presumably be enabled
95 ;; if/when <https://github.com/sddm/sddm/pull/616> is merged.
96 "-DENABLE_WAYLAND=ON"
97 "-DENABLE_PAM=ON"
98 ;; Both flags are required for elogind support.
99 "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON"
100 "-DCONFIG_FILE=/etc/sddm.conf"
101 ;; Set path to /etc/login.defs.
102 ;; An alternative would be to use -DUID_MIN and -DUID_MAX.
103 (string-append "-DLOGIN_DEFS_PATH="
104 (assoc-ref %build-inputs "shadow")
105 "/etc/login.defs")
106 (string-append "-DQT_IMPORTS_DIR="
107 (assoc-ref %outputs "out") "/lib/qt5/qml")
108 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
109 (assoc-ref %outputs "out") "/etc"))
110 #:phases
111 (modify-phases %standard-phases
112 (add-after 'unpack 'embed-loginctl-reference
113 (lambda _
114 (substitute* "CMakeLists.txt"
115 (("/usr/bin/loginctl") (which "loginctl")))
116 #t)))))
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
126 (define-public lightdm
127 (package
128 (name "lightdm")
129 (version "1.30.0")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append
133 "https://github.com/CanonicalLtd/lightdm/releases/download/"
134 version "/lightdm-" version ".tar.xz"))
135 (sha256
136 (base32
137 "158zb2d0v1309a8v19hh32y4yj3v6yg4yg6m0l7v59d3a2b7f651"))))
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))
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)
170 ("shadow" ,shadow) ;for sbin/nologin
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)
178 ("vala" ,vala) ;for Vala bindings
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
194 (define-public lightdm-gtk-greeter
195 (package
196 (name "lightdm-gtk-greeter")
197 (version "2.0.7")
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
206 "1g7wc3d3vqfa7mrdhx1w9ywydgjbffla6rbrxq9k3sc62br97qms"))))
207 (build-system gnu-build-system)
208 (native-inputs
209 `(("exo" ,exo)
210 ("intltool" ,intltool)
211 ("pkg-config" ,pkg-config)))
212 (inputs
213 `(("lightdm" ,lightdm)
214 ("gtk+" ,gtk+)))
215 (synopsis "GTK+ greeter for LightDM")
216 (home-page "https://launchpad.net/lightdm-gtk-greeter")
217 (description "This package provides a LightDM greeter implementation using
218 GTK+, lets you select a desktop session and log in to it.")
219 (license license:gpl3+)))
220
221 (define-public slim
222 (package
223 (name "slim")
224 (version "1.3.6")
225 (source (origin
226 (method url-fetch)
227 ;; Used to be available from download.berlios.de.
228 (uri (string-append
229 "mirror://sourceforge/slim.berlios/slim-"
230 version ".tar.gz"))
231 (sha256
232 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
233 (patches (search-patches "slim-config.patch"
234 "slim-reset.patch"
235 "slim-login.patch"
236 "slim-session.patch"
237 "slim-sigusr1.patch"
238 "slim-display.patch"))))
239 (build-system cmake-build-system)
240 (inputs `(("linux-pam" ,linux-pam)
241 ("libpng" ,libpng)
242 ("libjpeg" ,libjpeg)
243 ("freeglut" ,freeglut)
244 ("libxrandr" ,libxrandr)
245 ("libxrender" ,libxrender)
246 ("freetype" ,freetype)
247 ("fontconfig" ,fontconfig)
248 ("libx11" ,libx11)
249 ("libxft" ,libxft)
250 ("libxmu" ,libxmu)
251 ("xauth" ,xauth)))
252 (native-inputs
253 `(("pkg-config" ,pkg-config)))
254 (arguments
255 '(#:phases
256 (modify-phases %standard-phases
257 (add-before 'configure 'set-new-etc-location
258 (lambda _
259 (substitute* "CMakeLists.txt"
260 (("/etc")
261 (string-append (assoc-ref %outputs "out") "/etc"))
262 (("install.*systemd.*")
263 ;; The build system's logic here is: if "Linux", then
264 ;; "systemd". Strip that.
265 ""))
266 #t)))
267 #:configure-flags '("-DUSE_PAM=yes"
268 "-DUSE_CONSOLEKIT=no")
269 #:tests? #f))
270
271 ;; This used to be at <http://slim.berlios.de/>.
272 (home-page "https://sourceforge.net/projects/slim.berlios/")
273 (synopsis "Desktop-independent graphical login manager for X11")
274 (description
275 "SLiM is a Desktop-independent graphical login manager for X11, derived
276 from Login.app. It aims to be light and simple, although completely
277 configurable through themes and an option file; is suitable for machines on
278 which remote login functionalities are not needed.
279
280 Features included: PNG and XFT support for alpha transparency and antialiased
281 fonts, External themes support, Configurable runtime options: X server --
282 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
283 input control, Can load predefined user at startup, Configurable welcome /
284 shutdown messages, Random theme selection.")
285 (license license:gpl2)))