Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / kde-plasma.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
3 ;;; Copyright © 2018 Meiyo Peng <meiyo.peng@gmail.com>
4 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
5 ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
6 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages kde-plasma)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix build-system cmake)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages freedesktop)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages kde-frameworks)
32 #:use-module (gnu packages linux)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages qt)
35 #:use-module (gnu packages xorg))
36
37 (define-public kdecoration
38 (package
39 (name "kdecoration")
40 (version "5.17.0")
41 (source (origin
42 (method url-fetch)
43 (uri (string-append "mirror://kde/stable/plasma/" version
44 "/kdecoration-" version ".tar.xz"))
45 (sha256
46 (base32
47 "0rljpywpaqmar13jijphkpc9k1crma476j9my0d00hfrjil5xlnn"))))
48 (build-system cmake-build-system)
49 (native-inputs
50 `(("extra-cmake-modules" ,extra-cmake-modules)))
51 (inputs
52 `(("ki18n" ,ki18n)
53 ("qtbase" ,qtbase)))
54 (arguments
55 `(#:phases
56 (modify-phases %standard-phases
57 (add-before 'check 'check-setup
58 (lambda _ (setenv "QT_QPA_PLATFORM" "offscreen") #t)))))
59 (home-page "https://cgit.kde.org/kdecoration.git")
60 (synopsis "Plugin based library to create window decorations")
61 (description "KDecoration is a library to create window decorations.
62 These window decorations can be used by for example an X11 based window
63 manager which re-parents a Client window to a window decoration frame.")
64 (license license:lgpl3+)))
65
66 (define-public kscreenlocker
67 (package
68 (name "kscreenlocker")
69 (version "5.17.0")
70 (source (origin
71 (method url-fetch)
72 (uri (string-append "mirror://kde/stable/plasma/" version
73 "/kscreenlocker-" version ".tar.xz"))
74 (sha256
75 (base32
76 "1jzkq5m0hvcpsl7clai33ndiil8gls7ndir3mfcc5l8gv7df2ir0"))))
77 (build-system cmake-build-system)
78 (arguments
79 `(#:phases
80 (modify-phases %standard-phases
81 (add-before 'check 'check-setup
82 (lambda* (#:key inputs outputs #:allow-other-keys)
83 (system (string-append (assoc-ref inputs "xorg-server")
84 "/bin/Xvfb :1 -screen 0 640x480x24 &"))
85 (setenv "DISPLAY" ":1")
86 #t))
87 (delete 'check)
88 ;; Tests use the installed library and require a DBus session.
89 (add-after 'install 'check
90 (lambda _
91 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
92 (invoke "dbus-launch" "ctest" "."))))))
93 (native-inputs
94 `(("extra-cmake-modules" ,extra-cmake-modules)
95 ("pkg-config" ,pkg-config)
96
97 ;; For tests.
98 ("dbus" ,dbus)
99 ("xorg-server" ,xorg-server-for-tests)))
100 (inputs
101 `(("kcmutils" ,kcmutils)
102 ("kcrash" ,kcrash)
103 ("kdeclarative" ,kdeclarative)
104 ("kglobalaccel" ,kglobalaccel)
105 ("ki18n" ,ki18n)
106 ("kidletime" ,kidletime)
107 ("knotifications" ,knotifications)
108 ("ktextwidgets" ,ktextwidgets)
109 ("kwayland" ,kwayland)
110 ("kwindowsystem" ,kwindowsystem)
111 ("kxmlgui" ,kxmlgui)
112 ("libseccomp" ,libseccomp) ;for sandboxing the look'n'feel package
113 ("libxcursor" ,libxcursor) ;missing in CMakeList.txt
114 ("libxi" ,libxi) ;XInput, required for grabbing XInput2 devices
115 ("linux-pam" ,linux-pam)
116 ("logind" ,elogind) ;optional loginctl support
117 ("qtbase" ,qtbase)
118 ("qtdeclarative" ,qtdeclarative)
119 ("qtx11extras" ,qtx11extras)
120 ("solid" ,solid)
121 ("wayland" ,wayland)
122 ("xcb-util-keysyms" ,xcb-util-keysyms)))
123 (home-page "https://cgit.kde.org/kscreenlocker.git")
124 (synopsis "Screen locking library")
125 (description
126 "@code{kscreenlocker} is a library for creating secure lock screens.")
127 (license license:gpl2+)))
128
129 (define-public libkscreen
130 (package
131 (name "libkscreen")
132 (version "5.17.0")
133 (source
134 (origin
135 (method url-fetch)
136 (uri (string-append "mirror://kde/stable/plasma/" version "/"
137 name "-" version ".tar.xz"))
138 (sha256
139 (base32 "0znxfqqyyij6i4dp95gf5g4vrhg4jsshgh2k13ldy294kby2mxw0"))))
140 (build-system cmake-build-system)
141 (native-inputs
142 `(("extra-cmake-modules" ,extra-cmake-modules)
143 ;; For testing.
144 ("dbus" ,dbus)))
145 (inputs
146 `(("kwayland" ,kwayland)
147 ("libxrandr" ,libxrandr)
148 ("qtbase" ,qtbase)
149 ("qtx11extras" ,qtx11extras)))
150 (arguments
151 '(#:tests? #f ; FIXME: 55% tests passed, 5 tests failed out of 11
152 #:phases
153 (modify-phases %standard-phases
154 (add-before 'check 'pre-check
155 (lambda _
156 ;; For the missing '/etc/machine-id'.
157 (setenv "DBUS_FATAL_WARNINGS" "0")
158 ;; Run the tests offscreen.
159 (setenv "QT_QPA_PLATFORM" "offscreen")
160 #t)))))
161 (home-page "https://community.kde.org/Solid/Projects/ScreenManagement")
162 (synopsis "KDE's screen management software")
163 (description "KScreen is the new screen management software for KDE Plasma
164 Workspaces which tries to be as magic and automatic as possible for users with
165 basic needs and easy to configure for those who want special setups.")
166 (license license:gpl2+)))
167
168 (define-public libksysguard
169 (package
170 (name "libksysguard")
171 (version "5.17.0")
172 (source
173 (origin
174 (method url-fetch)
175 (uri (string-append "mirror://kde//stable/plasma/" version
176 "/libksysguard-" version ".tar.xz"))
177 (sha256
178 (base32
179 "1b79qxg6j9lqgyq8i677f00f7cbplqak1r9riyc9wj5s2r60ydw7"))))
180 (native-inputs
181 `(("extra-cmake-modules" ,extra-cmake-modules)
182 ("pkg-config" ,pkg-config)))
183 (inputs
184 `(("kconfigwidgets" ,kconfigwidgets)
185 ("kiconthemes" ,kiconthemes)
186 ("kwindowsystem" ,kwindowsystem)
187 ("ki18n" ,ki18n)
188 ("kauth" ,kauth)
189 ("kcompletion" ,kcompletion)
190 ("kconfig" ,kconfig)
191 ("kcoreaddons" ,kcoreaddons)
192 ("kglobalaccel" ,kglobalaccel)
193 ("kio" ,kio)
194 ("kwidgetsaddons" ,kwidgetsaddons)
195 ("kservice" ,kservice)
196 ("qtbase" ,qtbase)
197 ("qtscript" ,qtscript)
198 ("qtwebkit" ,qtwebkit)
199 ("qtx11extras" ,qtx11extras)
200 ("plasma" ,plasma-framework)
201 ("zlib" ,zlib)))
202 (build-system cmake-build-system)
203 (arguments
204 `(#:configure-flags
205 `(,(string-append "-DKDE_INSTALL_DATADIR="
206 (assoc-ref %outputs "out") "/share"))
207 #:phases
208 (modify-phases %standard-phases
209 (add-before 'configure 'patch-cmakelists
210 (lambda _
211 ;; TODO: Verify: This should no longer be necessary, since
212 ;; KF5AuthConfig.cmake.in contains this already.
213 (substitute* "processcore/CMakeLists.txt"
214 (("KAUTH_HELPER_INSTALL_DIR") "KDE_INSTALL_LIBEXECDIR"))))
215 (add-before 'check 'check-setup
216 (lambda _
217 ;; make Qt render "offscreen", required for tests
218 (setenv "QT_QPA_PLATFORM" "offscreen")))
219 (replace 'check
220 (lambda _
221 ;; TODO: Fix this failing test-case
222 (invoke "ctest" "-E" "processtest"))))))
223 (home-page "https://userbase.kde.org/KSysGuard")
224 (synopsis "Network enabled task and system monitoring")
225 (description "KSysGuard can obtain information on system load and
226 manage running processes. It obtains this information by interacting
227 with a ksysguardd daemon, which may also run on a remote system.")
228 (license license:gpl3+)))
229