gnu: slim: Display login message.
[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 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages display-managers)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system cmake)
26 #:use-module (guix packages)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages admin)
29 #:use-module (gnu packages fontutils)
30 #:use-module (gnu packages freedesktop)
31 #:use-module (gnu packages gl)
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages image)
34 #:use-module (gnu packages kde-frameworks)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages qt)
38 #:use-module (gnu packages xdisorg)
39 #:use-module (gnu packages xorg))
40
41 (define-public greenisland
42 (package
43 (name "greenisland")
44 (version "0.8.1")
45 (source (origin
46 (method url-fetch)
47 (uri (string-append
48 "https://github.com/greenisland/greenisland"
49 "/releases/download/v" version "/"
50 "greenisland-" version ".tar.xz"))
51 (sha256
52 (base32
53 "1c9rlq7fqrsd5nb37anjvnp9xspqjz1kc0fvydv5xdy3abg8mw40"))))
54 (build-system cmake-build-system)
55 (native-inputs
56 `(("extra-cmake-modules" ,extra-cmake-modules)
57 ("dbus" ,dbus)
58 ("glib:bin" ,glib "bin")
59 ("pkg-config" ,pkg-config)
60 ("xorg-server" ,xorg-server)))
61 (inputs
62 `(("elogind" ,elogind)
63 ("eudev" ,eudev)
64 ("fontconfig" ,fontconfig)
65 ("freetype" ,freetype)
66 ("glib" ,glib)
67 ("libdrm" ,libdrm)
68 ("libinput" ,libinput-minimal)
69 ("libxcursor" ,libxcursor)
70 ("libxkbcommon" ,libxkbcommon)
71 ("libx11" ,libx11)
72 ("mesa" ,mesa)
73 ("qtbase" ,qtbase)
74 ("qtdeclarative" ,qtdeclarative)
75 ("wayland" ,wayland)
76 ("wayland-protocols" ,wayland-protocols)
77 ("xcb-util-cursor" ,xcb-util-cursor)))
78 (arguments
79 `(#:configure-flags
80 (list (string-append "-DPLUGIN_INSTALL_DIR="
81 (assoc-ref %outputs "out") "/plugins")
82 (string-append "-DQML_INSTALL_DIR="
83 (assoc-ref %outputs "out") "/qml"))
84 #:modules ((guix build cmake-build-system)
85 (guix build qt-utils)
86 (guix build utils))
87 #:imported-modules (,@%cmake-build-system-modules
88 (guix build qt-utils))
89 #:phases
90 (modify-phases %standard-phases
91 (add-after 'unpack 'disable-udev-tests
92 (lambda _ ; FIXME: Build env doesn't contain /dev/sda
93 (substitute* "tests/auto/platform/tst_udev.cpp"
94 (("QVERIFY") "// QVERIFY")
95 (("QCOMPARE") "// QCOMPARE"))))
96 (replace 'check
97 (lambda _
98 (setenv "DBUS_FATAL_WARNINGS" "0")
99 (zero? (system* "dbus-launch" "ctest" "."))))
100 (add-before 'check 'check-setup
101 (lambda _
102 (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
103 (setenv "QT_QPA_PLATFORM" "offscreen")
104 (setenv "XDG_RUNTIME_DIR" (getcwd))
105 #t))
106 (add-after 'install 'wrap-programs
107 (lambda* (#:key outputs #:allow-other-keys)
108 (let ((out (assoc-ref outputs "out")))
109 (wrap-qt-program out "greenisland")
110 (wrap-qt-program out "greenisland-launcher")
111 (wrap-qt-program out "greenisland-screencaster")
112 (wrap-qt-program out "greenisland-wayland-scanner")
113 #t))))))
114 (synopsis "QtQuick Wayland compositor and shell for desktop and mobile")
115 (description "Green Island provides a full blown Wayland compositor for
116 QtQuick as well as pluggable hardware abstraction, extensions, tools and a
117 Qt-style API for Wayland clients.")
118 (home-page "http://hawaiios.org")
119 ;; Choice of license at the user's opinion.
120 (license (list license:gpl2 license:gpl3 license:lgpl2.1 license:lgpl3))))
121
122 (define-public sddm
123 (package
124 (name "sddm")
125 (version "0.14.0")
126 (source (origin
127 (method url-fetch)
128 (uri (string-append
129 "https://github.com/sddm/sddm"
130 "/releases/download/v" version "/"
131 "sddm-" version ".tar.xz"))
132 (sha256
133 (base32
134 "0y3pn8g2qj7q20zkmbasrfsj925lfzizk63sfrvzf84bc5c84d3y"))))
135 (build-system cmake-build-system)
136 (native-inputs
137 `(("extra-cmake-modules" ,extra-cmake-modules)
138 ("pkg-config" ,pkg-config)
139 ("qttools" ,qttools)))
140 (inputs
141 `(("glib" ,glib)
142 ("greenisland" ,greenisland)
143 ("libxcb" ,libxcb)
144 ("libxkbcommon" ,libxkbcommon)
145 ("linux-pam" ,linux-pam)
146 ("qtbase" ,qtbase)
147 ("qtdeclarative" ,qtdeclarative)
148 ("shadow" ,shadow)
149 ("wayland" ,wayland)))
150 (arguments
151 `(#:configure-flags
152 (list
153 ;; Currently doesn't do anything
154 ;; Option added by enable wayland greeters PR
155 "-DENABLE_WAYLAND=ON"
156 "-DENABLE_PAM=ON"
157 "-DCONFIG_FILE=/etc/sddm.conf"
158 ;; Set path to /etc/login.defs
159 ;; Alternatively use -DUID_MIN and -DUID_MAX
160 (string-append "-DLOGIN_DEFS_PATH="
161 (assoc-ref %build-inputs "shadow")
162 "/etc/login.defs")
163 (string-append "-DQT_IMPORTS_DIR="
164 (assoc-ref %outputs "out") "/qml")
165 (string-append "-DCMAKE_INSTALL_SYSCONFDIR="
166 (assoc-ref %outputs "out") "/etc"))
167 #:modules ((guix build cmake-build-system)
168 (guix build qt-utils)
169 (guix build utils))
170 #:imported-modules (,@%cmake-build-system-modules
171 (guix build qt-utils))
172 #:phases
173 (modify-phases %standard-phases
174 (add-after 'install 'wrap-programs
175 (lambda* (#:key outputs #:allow-other-keys)
176 (let ((out (assoc-ref outputs "out")))
177 (wrap-qt-program out "sddm")
178 (wrap-qt-program out "sddm-greeter")
179 #t))))))
180 (synopsis "QML based X11 and Wayland display manager")
181 (description "SDDM is a display manager for X11 and Wayland aiming to be
182 fast, simple and beautiful. SDDM is themeable and puts no restrictions on the
183 user interface design. It uses QtQuick which gives the designer the ability to
184 create smooth, animated user interfaces.")
185 (home-page "https://github.com/sddm/sddm")
186 ;; QML files are MIT licensed and images are CC BY 3.0.
187 (license (list license:gpl2+ license:expat license:cc-by3.0))))
188
189 (define-public slim
190 (package
191 (name "slim")
192 (version "1.3.6")
193 (source (origin
194 (method url-fetch)
195 ;; Used to be available from download.berlios.de.
196 (uri (string-append
197 "mirror://sourceforge/slim.berlios/slim-"
198 version ".tar.gz"))
199 (sha256
200 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
201 (patches (search-patches "slim-config.patch"
202 "slim-reset.patch"
203 "slim-login.patch"
204 "slim-session.patch"
205 "slim-sigusr1.patch"))))
206 (build-system cmake-build-system)
207 (inputs `(("linux-pam" ,linux-pam)
208 ("libpng" ,libpng)
209 ("libjpeg" ,libjpeg)
210 ("freeglut" ,freeglut)
211 ("libxrandr" ,libxrandr)
212 ("libxrender" ,libxrender)
213 ("freetype" ,freetype)
214 ("fontconfig" ,fontconfig)
215 ("libx11" ,libx11)
216 ("libxft" ,libxft)
217 ("libxmu" ,libxmu)
218 ("xauth" ,xauth)))
219 (native-inputs
220 `(("pkg-config" ,pkg-config)))
221 (arguments
222 '(#:phases (alist-cons-before
223 'configure 'set-new-etc-location
224 (lambda _
225 (substitute* "CMakeLists.txt"
226 (("/etc")
227 (string-append (assoc-ref %outputs "out") "/etc"))
228 (("install.*systemd.*")
229 ;; The build system's logic here is: if "Linux", then
230 ;; "systemd". Strip that.
231 "")))
232 %standard-phases)
233 #:configure-flags '("-DUSE_PAM=yes"
234 "-DUSE_CONSOLEKIT=no")
235 #:tests? #f))
236
237 ;; This used to be at <http://slim.berlios.de/>.
238 (home-page "http://sourceforge.net/projects/slim.berlios/")
239 (synopsis "Desktop-independent graphical login manager for X11")
240 (description
241 "SLiM is a Desktop-independent graphical login manager for X11, derived
242 from Login.app. It aims to be light and simple, although completely
243 configurable through themes and an option file; is suitable for machines on
244 which remote login functionalities are not needed.
245
246 Features included: PNG and XFT support for alpha transparency and antialiased
247 fonts, External themes support, Configurable runtime options: X server --
248 login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like)
249 input control, Can load predefined user at startup, Configurable welcome /
250 shutdown messages, Random theme selection.")
251 (license license:gpl2)))