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>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
41 (define-public greenisland
48 "https://github.com/greenisland/greenisland"
49 "/releases/download/v" version "/"
50 "greenisland-" version ".tar.xz"))
53 "1c9rlq7fqrsd5nb37anjvnp9xspqjz1kc0fvydv5xdy3abg8mw40"))))
54 (build-system cmake-build-system)
56 `(("extra-cmake-modules" ,extra-cmake-modules)
58 ("glib:bin" ,glib "bin")
59 ("pkg-config" ,pkg-config)
60 ("xorg-server" ,xorg-server)))
62 `(("elogind" ,elogind)
64 ("fontconfig" ,fontconfig)
65 ("freetype" ,freetype)
68 ("libinput" ,libinput-minimal)
69 ("libxcursor" ,libxcursor)
70 ("libxkbcommon" ,libxkbcommon)
74 ("qtdeclarative" ,qtdeclarative)
76 ("wayland-protocols" ,wayland-protocols)
77 ("xcb-util-cursor" ,xcb-util-cursor)))
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)
87 #:imported-modules (,@%cmake-build-system-modules
88 (guix build qt-utils))
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"))))
98 (setenv "DBUS_FATAL_WARNINGS" "0")
99 (zero? (system* "dbus-launch" "ctest" "."))))
100 (add-before 'check 'check-setup
102 (setenv "CTEST_OUTPUT_ON_FAILURE" "1") ; Enable debug output
103 (setenv "QT_QPA_PLATFORM" "offscreen")
104 (setenv "XDG_RUNTIME_DIR" (getcwd))
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")
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))))
129 "https://github.com/sddm/sddm"
130 "/releases/download/v" version "/"
131 "sddm-" version ".tar.xz"))
134 "0y3pn8g2qj7q20zkmbasrfsj925lfzizk63sfrvzf84bc5c84d3y"))))
135 (build-system cmake-build-system)
137 `(("extra-cmake-modules" ,extra-cmake-modules)
138 ("pkg-config" ,pkg-config)
139 ("qttools" ,qttools)))
142 ("greenisland" ,greenisland)
144 ("libxkbcommon" ,libxkbcommon)
145 ("linux-pam" ,linux-pam)
147 ("qtdeclarative" ,qtdeclarative)
149 ("wayland" ,wayland)))
153 ;; Currently doesn't do anything
154 ;; Option added by enable wayland greeters PR
155 "-DENABLE_WAYLAND=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")
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)
170 #:imported-modules (,@%cmake-build-system-modules
171 (guix build qt-utils))
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")
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))))
195 ;; Used to be available from download.berlios.de.
197 "mirror://sourceforge/slim.berlios/slim-"
200 (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))
201 (patches (search-patches "slim-config.patch"
205 "slim-sigusr1.patch"))))
206 (build-system cmake-build-system)
207 (inputs `(("linux-pam" ,linux-pam)
210 ("freeglut" ,freeglut)
211 ("libxrandr" ,libxrandr)
212 ("libxrender" ,libxrender)
213 ("freetype" ,freetype)
214 ("fontconfig" ,fontconfig)
220 `(("pkg-config" ,pkg-config)))
222 '(#:phases (alist-cons-before
223 'configure 'set-new-etc-location
225 (substitute* "CMakeLists.txt"
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.
233 #:configure-flags '("-DUSE_PAM=yes"
234 "-DUSE_CONSOLEKIT=no")
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")
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.
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)))