| 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 Tobias Geerinckx-Rice <me@tobias.gr> |
| 9 | ;;; |
| 10 | ;;; This file is part of GNU Guix. |
| 11 | ;;; |
| 12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 13 | ;;; under the terms of the GNU General Public License as published by |
| 14 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 15 | ;;; your option) any later version. |
| 16 | ;;; |
| 17 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | ;;; GNU General Public License for more details. |
| 21 | ;;; |
| 22 | ;;; You should have received a copy of the GNU General Public License |
| 23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 24 | |
| 25 | (define-module (gnu packages display-managers) |
| 26 | #:use-module ((guix licenses) #:prefix license:) |
| 27 | #:use-module (guix packages) |
| 28 | #:use-module (guix download) |
| 29 | #:use-module (guix build-system cmake) |
| 30 | #:use-module (guix build-system gnu) |
| 31 | #:use-module (guix packages) |
| 32 | #:use-module (guix utils) |
| 33 | #:use-module (gnu packages) |
| 34 | #:use-module (gnu packages admin) |
| 35 | #:use-module (gnu packages fontutils) |
| 36 | #:use-module (gnu packages freedesktop) |
| 37 | #:use-module (gnu packages gl) |
| 38 | #:use-module (gnu packages glib) |
| 39 | #:use-module (gnu packages gnome) |
| 40 | #:use-module (gnu packages gnupg) |
| 41 | #:use-module (gnu packages gtk) |
| 42 | #:use-module (gnu packages image) |
| 43 | #:use-module (gnu packages kde-frameworks) |
| 44 | #:use-module (gnu packages linux) |
| 45 | #:use-module (gnu packages pkg-config) |
| 46 | #:use-module (gnu packages python) |
| 47 | #:use-module (gnu packages qt) |
| 48 | #:use-module (gnu packages xdisorg) |
| 49 | #:use-module (gnu packages xfce) |
| 50 | #:use-module (gnu packages xorg)) |
| 51 | |
| 52 | (define-public sddm |
| 53 | (package |
| 54 | (name "sddm") |
| 55 | (version "0.18.1") |
| 56 | (source (origin |
| 57 | (method url-fetch) |
| 58 | (uri (string-append |
| 59 | "https://github.com/sddm/sddm" |
| 60 | "/releases/download/v" version "/" |
| 61 | "sddm-" version ".tar.xz")) |
| 62 | (sha256 |
| 63 | (base32 |
| 64 | "0nilrhwlyvkngjgxfc08n73c16azgmw80pvx0a78xqww9y3hv4xh")))) |
| 65 | (build-system cmake-build-system) |
| 66 | (native-inputs |
| 67 | `(("extra-cmake-modules" ,extra-cmake-modules) |
| 68 | ("pkg-config" ,pkg-config) |
| 69 | ("qttools" ,qttools))) |
| 70 | (inputs |
| 71 | `(("elogind" ,elogind) |
| 72 | ("glib" ,glib) |
| 73 | ("libxcb" ,libxcb) |
| 74 | ("libxkbcommon" ,libxkbcommon) |
| 75 | ("linux-pam" ,linux-pam) |
| 76 | ("qtbase" ,qtbase) |
| 77 | ("qtdeclarative" ,qtdeclarative) |
| 78 | |
| 79 | ;; Some user-defined themes use QtQuick components internally. Adding |
| 80 | ;; QtQuick & co. here; they end up in QML2_IMPORT_PATH thanks to |
| 81 | ;; 'wrap-qt-program'. |
| 82 | ("qtgraphicaleffects" ,qtgraphicaleffects) |
| 83 | ("qtquickcontrols" ,qtquickcontrols) |
| 84 | ("qtquickcontrols2" ,qtquickcontrols2) |
| 85 | ("qtsvg" ,qtsvg) |
| 86 | |
| 87 | ("shadow" ,shadow) |
| 88 | ("wayland" ,wayland))) |
| 89 | (arguments |
| 90 | `(#:configure-flags |
| 91 | (list |
| 92 | ;; This option currently does nothing, but will presumably be enabled |
| 93 | ;; if/when <https://github.com/sddm/sddm/pull/616> is merged. |
| 94 | "-DENABLE_WAYLAND=ON" |
| 95 | "-DENABLE_PAM=ON" |
| 96 | ;; Both flags are required for elogind support. |
| 97 | "-DNO_SYSTEMD=ON" "-DUSE_ELOGIND=ON" |
| 98 | "-DCONFIG_FILE=/etc/sddm.conf" |
| 99 | ;; Set path to /etc/login.defs. |
| 100 | ;; An alternative would be to use -DUID_MIN and -DUID_MAX. |
| 101 | (string-append "-DLOGIN_DEFS_PATH=" |
| 102 | (assoc-ref %build-inputs "shadow") |
| 103 | "/etc/login.defs") |
| 104 | (string-append "-DQT_IMPORTS_DIR=" |
| 105 | (assoc-ref %outputs "out") "/qml") |
| 106 | (string-append "-DCMAKE_INSTALL_SYSCONFDIR=" |
| 107 | (assoc-ref %outputs "out") "/etc")) |
| 108 | #:modules ((guix build cmake-build-system) |
| 109 | (guix build qt-utils) |
| 110 | (guix build utils)) |
| 111 | #:imported-modules (,@%cmake-build-system-modules |
| 112 | (guix build qt-utils)) |
| 113 | #:phases |
| 114 | (modify-phases %standard-phases |
| 115 | (add-after 'unpack 'embed-loginctl-reference |
| 116 | (lambda _ |
| 117 | (substitute* "CMakeLists.txt" |
| 118 | (("/usr/bin/loginctl") (which "loginctl"))) |
| 119 | #t)) |
| 120 | (add-after 'install 'wrap-programs |
| 121 | (lambda* (#:key outputs #:allow-other-keys) |
| 122 | (let ((out (assoc-ref outputs "out"))) |
| 123 | (wrap-qt-program out "sddm") |
| 124 | (wrap-qt-program out "sddm-greeter") |
| 125 | #t)))))) |
| 126 | (synopsis "QML based X11 and Wayland display manager") |
| 127 | (description "SDDM is a display manager for X11 and Wayland aiming to be |
| 128 | fast, simple and beautiful. SDDM is themeable and puts no restrictions on the |
| 129 | user interface design. It uses QtQuick which gives the designer the ability to |
| 130 | create smooth, animated user interfaces.") |
| 131 | (home-page "https://github.com/sddm/sddm") |
| 132 | ;; QML files are MIT licensed and images are CC BY 3.0. |
| 133 | (license (list license:gpl2+ license:expat license:cc-by3.0)))) |
| 134 | |
| 135 | (define-public lightdm |
| 136 | (package |
| 137 | (name "lightdm") |
| 138 | (version "1.24.0") |
| 139 | (source (origin |
| 140 | (method url-fetch) |
| 141 | (uri (string-append "https://launchpad.net/lightdm/" |
| 142 | (version-major+minor version) "/" |
| 143 | version "/+download/lightdm-" |
| 144 | version ".tar.xz")) |
| 145 | (sha256 |
| 146 | (base32 |
| 147 | "18j33bm54i8k7ncxcs69zqi4105s62n58jrydqn3ikrb71s9nl6d")))) |
| 148 | (build-system gnu-build-system) |
| 149 | (arguments |
| 150 | '(#:parallel-tests? #f ; fails when run in parallel |
| 151 | #:configure-flags |
| 152 | (list "--localstatedir=/var") |
| 153 | #:phases |
| 154 | (modify-phases %standard-phases |
| 155 | (add-after 'unpack 'fix-paths |
| 156 | (lambda _ |
| 157 | (substitute* "src/shared-data-manager.c" |
| 158 | (("/bin/rm") (which "rm"))) |
| 159 | (substitute* '("data/users.conf" |
| 160 | "common/user-list.c") |
| 161 | (("/bin/false") (which "false")) |
| 162 | (("/usr/sbin/nologin") (which "nologin"))) |
| 163 | (substitute* "src/seat.c" |
| 164 | (("/bin/sh") (which "sh"))) |
| 165 | #t)) |
| 166 | (add-after 'unpack 'disable-broken-tests |
| 167 | (lambda _ |
| 168 | (substitute* "tests/Makefile.in" |
| 169 | (("test-sessions-gobject ") "") |
| 170 | ((" test-sessions-python ") " ")) |
| 171 | #t)) |
| 172 | (add-before 'check 'pre-check |
| 173 | ;; Run test-suite under a dbus session. |
| 174 | (lambda* (#:key inputs #:allow-other-keys) |
| 175 | (wrap-program "tests/src/test-python-greeter" |
| 176 | `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))) |
| 177 | `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))) |
| 178 | |
| 179 | ;; Avoid printing locale warnings, which trip up the text |
| 180 | ;; matching tests. |
| 181 | (unsetenv "LC_ALL") |
| 182 | #t))))) |
| 183 | (inputs |
| 184 | `(("audit" ,audit) |
| 185 | ("linux-pam" ,linux-pam) |
| 186 | ("shadow" ,shadow) ;for sbin/nologin |
| 187 | ("libgcrypt" ,libgcrypt) |
| 188 | ("libxcb" ,libxcb))) |
| 189 | (native-inputs |
| 190 | `(("gobject-introspection" ,gobject-introspection) |
| 191 | ("pkg-config" ,pkg-config) |
| 192 | ("itstool" ,itstool) |
| 193 | ("intltool" ,intltool) |
| 194 | ;; For tests |
| 195 | ("dbus" ,dbus) |
| 196 | ("python" ,python-2) |
| 197 | ("python-pygobject" ,python2-pygobject))) |
| 198 | ;; Required by liblightdm-gobject-1.pc. |
| 199 | (propagated-inputs |
| 200 | `(("glib" ,glib) |
| 201 | ("libx11" ,libx11) |
| 202 | ("libxklavier" ,libxklavier))) |
| 203 | (home-page "https://www.freedesktop.org/wiki/Software/LightDM/") |
| 204 | (synopsis "Lightweight display manager") |
| 205 | (description "The Light Display Manager (LightDM) is a cross-desktop |
| 206 | display manager which supports different greeters.") |
| 207 | (license license:gpl3+))) |
| 208 | |
| 209 | (define-public lightdm-gtk-greeter |
| 210 | (package |
| 211 | (name "lightdm-gtk-greeter") |
| 212 | (version "2.0.2") |
| 213 | (source (origin |
| 214 | (method url-fetch) |
| 215 | (uri (string-append |
| 216 | "https://launchpad.net/lightdm-gtk-greeter/" |
| 217 | (version-major+minor version) "/" version |
| 218 | "/+download/lightdm-gtk-greeter-" version ".tar.gz")) |
| 219 | (sha256 |
| 220 | (base32 |
| 221 | "1436sdm83xqhxyr1rzqxhsl8if2xmidlvb341xcv6dv83lyxkrlf")))) |
| 222 | (build-system gnu-build-system) |
| 223 | (native-inputs |
| 224 | `(("exo" ,exo) |
| 225 | ("intltool" ,intltool) |
| 226 | ("pkg-config" ,pkg-config))) |
| 227 | (inputs |
| 228 | `(("lightdm" ,lightdm) |
| 229 | ("gtk+" ,gtk+))) |
| 230 | (synopsis "GTK+ greeter for LightDM") |
| 231 | (home-page "https://launchpad.net/lightdm-gtk-greeter") |
| 232 | (description "This package provides a LightDM greeter implementation using |
| 233 | GTK+, lets you select a desktop session and log in to it.") |
| 234 | (license license:gpl3+))) |
| 235 | |
| 236 | (define-public slim |
| 237 | (package |
| 238 | (name "slim") |
| 239 | (version "1.3.6") |
| 240 | (source (origin |
| 241 | (method url-fetch) |
| 242 | ;; Used to be available from download.berlios.de. |
| 243 | (uri (string-append |
| 244 | "mirror://sourceforge/slim.berlios/slim-" |
| 245 | version ".tar.gz")) |
| 246 | (sha256 |
| 247 | (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1")) |
| 248 | (patches (search-patches "slim-config.patch" |
| 249 | "slim-reset.patch" |
| 250 | "slim-login.patch" |
| 251 | "slim-session.patch" |
| 252 | "slim-sigusr1.patch" |
| 253 | "slim-display.patch")))) |
| 254 | (build-system cmake-build-system) |
| 255 | (inputs `(("linux-pam" ,linux-pam) |
| 256 | ("libpng" ,libpng) |
| 257 | ("libjpeg" ,libjpeg) |
| 258 | ("freeglut" ,freeglut) |
| 259 | ("libxrandr" ,libxrandr) |
| 260 | ("libxrender" ,libxrender) |
| 261 | ("freetype" ,freetype) |
| 262 | ("fontconfig" ,fontconfig) |
| 263 | ("libx11" ,libx11) |
| 264 | ("libxft" ,libxft) |
| 265 | ("libxmu" ,libxmu) |
| 266 | ("xauth" ,xauth))) |
| 267 | (native-inputs |
| 268 | `(("pkg-config" ,pkg-config))) |
| 269 | (arguments |
| 270 | '(#:phases |
| 271 | (modify-phases %standard-phases |
| 272 | (add-before 'configure 'set-new-etc-location |
| 273 | (lambda _ |
| 274 | (substitute* "CMakeLists.txt" |
| 275 | (("/etc") |
| 276 | (string-append (assoc-ref %outputs "out") "/etc")) |
| 277 | (("install.*systemd.*") |
| 278 | ;; The build system's logic here is: if "Linux", then |
| 279 | ;; "systemd". Strip that. |
| 280 | "")) |
| 281 | #t))) |
| 282 | #:configure-flags '("-DUSE_PAM=yes" |
| 283 | "-DUSE_CONSOLEKIT=no") |
| 284 | #:tests? #f)) |
| 285 | |
| 286 | ;; This used to be at <http://slim.berlios.de/>. |
| 287 | (home-page "https://sourceforge.net/projects/slim.berlios/") |
| 288 | (synopsis "Desktop-independent graphical login manager for X11") |
| 289 | (description |
| 290 | "SLiM is a Desktop-independent graphical login manager for X11, derived |
| 291 | from Login.app. It aims to be light and simple, although completely |
| 292 | configurable through themes and an option file; is suitable for machines on |
| 293 | which remote login functionalities are not needed. |
| 294 | |
| 295 | Features included: PNG and XFT support for alpha transparency and antialiased |
| 296 | fonts, External themes support, Configurable runtime options: X server -- |
| 297 | login / shutdown / reboot commands, Single (GDM-like) or double (XDM-like) |
| 298 | input control, Can load predefined user at startup, Configurable welcome / |
| 299 | shutdown messages, Random theme selection.") |
| 300 | (license license:gpl2))) |