812f63cb45573cf9f8768e606ebe090cf6cff596
[jackhill/guix/guix.git] / gnu / packages / kde.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
4 ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
5 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages kde)
23 #:use-module (guix build-system cmake)
24 #:use-module (guix download)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix utils)
28 #:use-module (gnu packages algebra)
29 #:use-module (gnu packages apr)
30 #:use-module (gnu packages boost)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages curl)
33 #:use-module (gnu packages documentation)
34 #:use-module (gnu packages gettext)
35 #:use-module (gnu packages ghostscript)
36 #:use-module (gnu packages gl)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages graphics)
39 #:use-module (gnu packages image)
40 #:use-module (gnu packages kde-frameworks)
41 #:use-module (gnu packages llvm)
42 #:use-module (gnu packages maths)
43 #:use-module (gnu packages pdf)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages photo)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages tls)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages version-control)
50 #:use-module (gnu packages xorg))
51
52 (define-public kdevelop
53 (package
54 (name "kdevelop")
55 (version "5.1.2")
56 (source
57 (origin
58 (method url-fetch)
59 (uri (string-append "mirror://kde/stable/kdevelop"
60 "/" version "/src/kdevelop-"
61 version ".tar.xz"))
62 (sha256
63 (base32
64 "1iqaq0ilijjigqb34v5wq9in6bnjs0p9cmgbygjmy53xhh3yhm5g"))))
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 `(("kdevplatform" ,kdevplatform)
72 ("kdevelop-pg-qt" ,kdevelop-pg-qt)
73 ("qtbase" ,qtbase)
74 ("qtdeclarative" ,qtdeclarative)
75 ("qtquickcontrols" ,qtquickcontrols)
76 ("qtwebkit" ,qtwebkit)
77 ("karchive" ,karchive)
78 ("kcmutils" ,kcmutils)
79 ("kconfig" ,kconfig)
80 ("kdeclarative" ,kdeclarative)
81 ("kdoctools" ,kdoctools)
82 ("kguiaddons" ,kguiaddons)
83 ("ki18n" ,ki18n)
84 ("kio" ,kio)
85 ("kiconthemes" ,kiconthemes)
86 ("kitemmodels" ,kitemmodels)
87 ("kitemviews" ,kitemviews)
88 ("kjobwidgets" ,kjobwidgets)
89 ("knotifyconfig" ,knotifyconfig)
90 ("knotifications" ,knotifications)
91 ("kparts" ,kparts)
92 ("kcrash" ,kcrash)
93 ("knewstuff" ,knewstuff)
94 ("krunner" ,krunner)
95 ("kxmlgui" ,kxmlgui)
96 ("libksysguard" ,libksysguard)
97 ("threadweaver" ,threadweaver)
98 ("ktexteditor" ,ktexteditor)
99 ("kwindowsystem" ,kwindowsystem)
100 ("plasma" ,plasma-framework)
101 ("grantlee" ,grantlee)
102 ("libepoxy" ,libepoxy)
103 ("clang" ,clang)
104 ("shared-mime-info" ,shared-mime-info)))
105 (arguments
106 `(#:phases
107 (modify-phases %standard-phases
108 (delete 'check) ;; there are some issues with the test suite
109 (add-after 'install 'wrap-executable
110 (lambda* (#:key inputs outputs #:allow-other-keys)
111 (let* ((out (assoc-ref outputs "out"))
112 (kdevplatform (assoc-ref inputs "kdevplatform"))
113 (kio (assoc-ref inputs "kio"))
114 (kcmutils (assoc-ref inputs "kcmutils"))
115 (qtquickcontrols (assoc-ref inputs "qtquickcontrols"))
116 (qtbase (assoc-ref inputs "qtbase"))
117 (qtdeclarative (assoc-ref inputs "qtdeclarative"))
118 (qml "/qml"))
119 (wrap-program (string-append out "/bin/kdevelop")
120 `("XDG_DATA_DIRS" ":" prefix
121 ,(map (lambda (s) (string-append s "/share"))
122 (list out kdevplatform kcmutils)))
123 `("QT_QPA_PLATFORM_PLUGIN_PATH" ":" =
124 (,(string-append qtbase "/plugins/platforms")))
125 `("QT_PLUGIN_PATH" ":" prefix
126 ,(map (lambda (s) (string-append s "/lib/plugins"))
127 (list out kdevplatform kio)))
128 `("QML2_IMPORT_PATH" ":" prefix
129 (,(string-append qtquickcontrols qml)
130 ,(string-append qtdeclarative qml))))))))))
131 (home-page "https://kdevelop.org")
132 (synopsis "IDE for C, C++, Python, Javascript and PHP")
133 (description "The KDevelop IDE provides semantic syntax highlighting, as
134 well as code navigation and completion for C, C++ (using Clang/LLVM), QML,
135 JavaScript, Python and PHP. It also integrates with a debugger, different
136 build systems (CMake, QMake, custom Makefiles) and version control
137 software (Git, Subversion, Mercurial, CVS and Bazaar).")
138 (license license:lgpl2.1+)))
139
140 (define-public kdevelop-pg-qt
141 (package
142 (name "kdevelop-pg-qt")
143 (version "2.0.0")
144 (source
145 (origin
146 (method url-fetch)
147 (uri (string-append "https://github.com/KDE/kdevelop-pg-qt/archive/v"
148 version ".tar.gz"))
149 (file-name (string-append name "-" version ".tar.gz"))
150 (sha256
151 (base32 "1av8plqz7hyhrd07avnmn6ryslqlarmxn0pw7swzvb6ddiqp59j4"))))
152 (native-inputs
153 `(("extra-cmake-modules" ,extra-cmake-modules)))
154 (inputs
155 `(("qtbase" ,qtbase)))
156 (build-system cmake-build-system)
157 (home-page "https://kde.org")
158 (synopsis "Parser generator library for KDevplatform")
159 (description "KDevelop-PG-Qt is the parser generator used in KDevplatform
160 for some KDevelop language plugins (Ruby, PHP, CSS...).")
161 (license license:lgpl2.0+)))
162
163 (define-public kdevplatform
164 (package
165 (name "kdevplatform")
166 (version "5.1.2")
167 (source (origin
168 (method url-fetch)
169 (uri (string-append "mirror://kde/stable/kdevelop"
170 "/" version "/src/kdevplatform-"
171 version ".tar.xz"))
172 (sha256
173 (base32
174 "0jk6g1kiqpyjy8pca0236b9944gxqnymqv8ny6m8nrraannxs8p6"))))
175 (build-system cmake-build-system)
176 (native-inputs
177 `(("extra-cmake-modules" ,extra-cmake-modules)
178 ("pkg-config" ,pkg-config)))
179 (inputs
180 `(("apr" ,apr)
181 ("apr-util" ,apr-util)
182 ("boost" ,boost)
183 ("karchive" ,karchive)
184 ("kconfigwidgets" ,kconfigwidgets)
185 ("kcmutils" ,kcmutils)
186 ("kiconthemes" ,kiconthemes)
187 ("kdeclarative" ,kdeclarative)
188 ("kdoctools" ,kdoctools)
189 ("kguiaddons" ,kguiaddons)
190 ("kinit" ,kinit)
191 ("kitemmodels" ,kitemmodels)
192 ("knewstuff" ,knewstuff)
193 ("knotifications" ,knotifications)
194 ("knotifyconfig" ,knotifyconfig)
195 ("kwindowsystem" ,kwindowsystem)
196 ("kio" ,kio)
197 ("ki18n" ,ki18n)
198 ("kparts" ,kparts)
199 ("kservice" ,kservice)
200 ("grantlee" ,grantlee)
201 ("libkomparediff2" ,libkomparediff2)
202 ("sonnet" ,sonnet)
203 ("threadweaver" ,threadweaver)
204 ("ktexteditor" ,ktexteditor)
205 ("qtbase" ,qtbase)
206 ("qtdeclarative" ,qtdeclarative)
207 ("qtscript" ,qtscript)
208 ("qtwebkit" ,qtwebkit)
209 ("qtx11extras" ,qtx11extras)
210 ("plasma" ,plasma-framework)
211 ("subversion" ,subversion)
212 ("zlib" ,zlib)))
213 (arguments
214 `(#:phases
215 (modify-phases %standard-phases
216 (delete 'check)
217 (add-after 'install 'check ;; add-after 'install
218 (lambda* (#:key outputs #:allow-other-keys)
219 (let ((out (assoc-ref outputs "out")))
220 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
221 (setenv "QT_PLUGIN_PATH"
222 (string-append out "/lib/plugins:"
223 (getenv "QT_PLUGIN_PATH")))
224 (setenv "XDG_DATA_DIRS"
225 (string-append out "/share:"
226 (getenv "XDG_DATA_DIRS")))
227 (zero?
228 (system* "ctest" "-R" ;; almost all tests require a display
229 "filteringstrategy|kdevvarlengtharray|kdevhash"))))))))
230 (home-page "https://github.com/KDE/kdevplatform")
231 (synopsis "Framework to build integrated development environments (IDEs)")
232 (description "KDevPlatform is the basis of KDevelop and contains some
233 plugins, as well as code to create plugins, or complete applications.")
234 (license license:gpl3+)))
235
236 (define-public krita
237 (package
238 (name "krita")
239 (version "3.3.3")
240 (source (origin
241 (method url-fetch)
242 (uri (string-append
243 "mirror://kde/stable/krita/"
244 (version-prefix version 3)
245 "/" name "-" version ".tar.gz"))
246 (sha256
247 (base32
248 "0pc6hnakkqy81x5b5ncivaps6hqv43i50sjwgi3i3cz9j8rlxh5y"))))
249 (build-system cmake-build-system)
250 (arguments
251 `(#:tests? #f
252 #:configure-flags
253 (list "-DBUILD_TESTING=OFF" "-DKDE4_BUILD_TESTS=OFF"
254 (string-append "-DWITH_FFTW3="
255 (assoc-ref %build-inputs "fftw"))
256 (string-append "-DWITH_GSL="
257 (assoc-ref %build-inputs "gsl"))
258 (string-append "-DWITH_LibRaw="
259 (assoc-ref %build-inputs "libraw"))
260 (string-append "-DWITH_TIFF="
261 (assoc-ref %build-inputs "libtiff"))
262 (string-append "-DCMAKE_CXX_FLAGS=-I"
263 (assoc-ref %build-inputs "ilmbase")
264 "/include/OpenEXR"))
265 #:phases
266 (modify-phases %standard-phases
267 ;; Ensure that icons are found at runtime.
268 ;; This works around <https://bugs.gnu.org/22138>.
269 (add-after 'install 'wrap-executable
270 (lambda* (#:key inputs outputs #:allow-other-keys)
271 (let ((out (assoc-ref outputs "out"))
272 (qt '("qtbase" "qtsvg")))
273 (wrap-program (string-append out "/bin/krita")
274 `("QT_PLUGIN_PATH" ":" prefix
275 ,(map (lambda (label)
276 (string-append (assoc-ref inputs label)
277 "/lib/qt5/plugins/"))
278 qt)))
279 #t))))))
280 (native-inputs
281 `(("curl" ,curl)
282 ("eigen" ,eigen)
283 ("extra-cmake-modules" ,extra-cmake-modules)
284 ("gettext-minimal" ,gettext-minimal)
285 ("kitemmodels" ,kitemmodels)
286 ("qwt" ,qwt)
287 ("vc" ,vc)))
288 (inputs
289 `(("qtbase" ,qtbase)
290 ("qtdeclarative" ,qtdeclarative)
291 ("qtmultimedia" ,qtmultimedia)
292 ("qtx11extras" ,qtx11extras)
293 ("qtsvg" ,qtsvg)
294 ("karchive" ,karchive)
295 ("kcompletion" ,kcompletion)
296 ("kconfig" ,kconfig)
297 ("kcoreaddons" ,kcoreaddons)
298 ("kcrash" ,kcrash)
299 ("kguiaddons" ,kguiaddons)
300 ("ki18n" ,ki18n)
301 ("kiconthemes" ,kiconthemes)
302 ("kio" ,kio)
303 ("kitemviews" ,kitemviews)
304 ("kwidgetsaddons" ,kwidgetsaddons)
305 ("kwindowsystem" ,kwindowsystem)
306 ("kxmlgui" ,kxmlgui)
307 ("boost" ,boost)
308 ("exiv2" ,exiv2)
309 ("lcms" ,lcms)
310 ("libpng" ,libpng)
311 ("libjpeg-turbo" ,libjpeg-turbo)
312 ("zlib" ,zlib)
313 ("libx11" ,libx11)
314 ("libxcb" ,libxcb)
315 ("libxi" ,libxi)
316 ("fftw" ,fftw)
317 ("gsl" ,gsl)
318 ("poppler-qt5" ,poppler-qt5)
319 ("libraw" ,libraw)
320 ("libtiff" ,libtiff)
321 ("perl" ,perl)
322 ("ilmbase" ,ilmbase)
323 ("openexr" ,openexr)))
324 (home-page "https://krita.org")
325 (synopsis "Digital painting application")
326 (description
327 "Krita is a professional painting tool designed for concept artists,
328 illustrators, matte and texture artists, and the VFX industry. Notable
329 features include brush stabilizers, brush engines and wrap-around mode.")
330 (license license:gpl2+)))
331
332 (define-public kholidays
333 (package
334 (name "kholidays")
335 (version "17.12.1")
336 (source
337 (origin
338 (method url-fetch)
339 (uri (string-append
340 "mirror://kde/stable/applications/" version "/src/"
341 name "-" version ".tar.xz"))
342 (sha256
343 (base32 "0595d7wbnz8kyq1bnivdrp20lwdp8ykvdll1fmb0fgm4q24z0cl8"))))
344 (build-system cmake-build-system)
345 (arguments
346 `(#:phases
347 (modify-phases %standard-phases
348 (add-before 'check 'check-setup
349 (lambda _
350 ;; blacklist a failing test function TODO: make it pass
351 (with-output-to-file "autotests/BLACKLIST"
352 (lambda _
353 (display "[testDefaultRegions]\n*\n")))
354 #t)))))
355 (native-inputs
356 `(("extra-cmake-modules" ,extra-cmake-modules)
357 ("qttools" ,qttools)))
358 (inputs
359 `(("qtbase" ,qtbase)
360 ("qtdeclarative" ,qtdeclarative)))
361 (home-page "https://cgit.kde.org/kholidays.git")
362 (synopsis "Library for regional holiday information")
363 (description "This library provides a C++ API that determines holiday and
364 other special events for a geographical region.")
365 (license license:lgpl2.0+)))
366
367 (define-public libkomparediff2
368 (package
369 (name "libkomparediff2")
370 (version "17.12.1")
371 (source
372 (origin
373 (method url-fetch)
374 (uri (string-append "mirror://kde/stable/applications"
375 "/" version "/src/" name "-" version ".tar.xz"))
376 (file-name (string-append name "-" version ".tar.gz"))
377 (sha256
378 (base32
379 "0jd700pjw51vyan5d22k6j60jgb95pfn2nvwz2nfs2f4xlsly1hz"))))
380 (native-inputs
381 `(("extra-cmake-modules" ,extra-cmake-modules)
382 ("pkg-config" ,pkg-config)))
383 (inputs
384 `(("kcodecs" ,kcodecs)
385 ("kconfig" ,kconfig)
386 ("kcoreaddons" ,kcoreaddons)
387 ("ki18n" ,ki18n)
388 ("kio" ,kio)
389 ("kxmlgui" ,kxmlgui)
390 ("qtbase" ,qtbase)))
391 (build-system cmake-build-system)
392 (home-page "https://kde.org")
393 (synopsis "Library to compare files and strings, used in Kompare and KDevelop")
394 (description "Libkomparediff2 is a library to work with diffs and patches,
395 used in KDE development tools Kompare and KDevelop.")
396
397 ;; GPL, some files are also licensed under LGPL or BSD, see COPYING in the
398 ;; source archive
399 (license (list license:gpl2+ license:lgpl2.0+ license:bsd-3))))
400
401 (define-public libksysguard
402 (package
403 (name "libksysguard")
404 (version "5.11.5")
405 (source
406 (origin
407 (method url-fetch)
408 (uri (string-append "mirror://kde//stable/plasma/" version
409 "/libksysguard-" version ".tar.xz"))
410 (sha256
411 (base32
412 "0f2py4zkqzpxxf3mqaij0q8ka0v3nschj17dv6rbzzmr5mjv825f"))))
413 (native-inputs
414 `(("extra-cmake-modules" ,extra-cmake-modules)
415 ("pkg-config" ,pkg-config)))
416 (inputs
417 `(("kconfigwidgets" ,kconfigwidgets)
418 ("kiconthemes" ,kiconthemes)
419 ("kwindowsystem" ,kwindowsystem)
420 ("ki18n" ,ki18n)
421 ("kauth" ,kauth)
422 ("kcompletion" ,kcompletion)
423 ("kconfig" ,kconfig)
424 ("kcoreaddons" ,kcoreaddons)
425 ("kwidgetsaddons" ,kwidgetsaddons)
426 ("kservice" ,kservice)
427 ("qtbase" ,qtbase)
428 ("qtscript" ,qtscript)
429 ("qtwebkit" ,qtwebkit)
430 ("qtx11extras" ,qtx11extras)
431 ("plasma" ,plasma-framework)
432 ("zlib" ,zlib)))
433 (build-system cmake-build-system)
434 (arguments
435 `(#:configure-flags
436 `(,(string-append "-DKDE_INSTALL_DATADIR="
437 (assoc-ref %outputs "out") "/share"))
438 #:phases
439 (modify-phases %standard-phases
440 (add-before 'configure 'patch-cmakelists
441 (lambda _
442 ;; TODO: Verify: This should no longer be necessary, since
443 ;; KF5AuthConfig.cmake.in contains this already.
444 (substitute* "processcore/CMakeLists.txt"
445 (("KAUTH_HELPER_INSTALL_DIR") "KDE_INSTALL_LIBEXECDIR"))))
446 (add-before 'check 'check-setup
447 (lambda _
448 ;; make Qt render "offscreen", required for tests
449 (setenv "QT_QPA_PLATFORM" "offscreen")))
450 (replace 'check
451 (lambda _
452 ;; TODO: Fix this failing test-case
453 (zero? (system* "ctest" "-E" "processtest")))))))
454 (home-page "https://www.kde.org/info/plasma-5.11.5.php")
455 (synopsis "Network enabled task and system monitoring")
456 (description "KSysGuard can obtain information on system load and
457 manage running processes. It obtains this information by interacting
458 with a ksysguardd daemon, which may also run on a remote system.")
459 (license license:gpl3+)))
460
461 (define-public qca
462 (package
463 (name "qca")
464 (version "2.1.3")
465 (source
466 (origin
467 (method url-fetch)
468 (uri (string-append "mirror://kde/stable/qca/" version
469 "/src/qca-" version ".tar.xz"))
470 (sha256
471 (base32
472 "0lz3n652z208daxypdcxiybl0a9fnn6ida0q7fh5f42269mdhgq0"))))
473 (build-system cmake-build-system)
474 (native-inputs
475 `(("pkg-config" ,pkg-config)))
476 (inputs
477 `(("openssl" ,openssl)
478 ("qtbase" ,qtbase)))
479 (home-page "https://userbase.kde.org/QCA")
480 (synopsis "Libraries for the Qt Cryptographic Architecture")
481 (description "The Qt Cryptographic Architecture (QCA) provides a
482 straightforward and cross-platform API for a range of cryptographic features,
483 including SSL/TLS, X.509 certificates, SASL, OpenPGP, S/MIME CMS, and smart
484 cards.")
485 (license license:lgpl2.1)))
486
487 (define-public snorenotify
488 (package
489 (name "snorenotify")
490 (version "0.7.0")
491 (source
492 (origin
493 (method url-fetch)
494 (uri (string-append "mirror://kde/stable/snorenotify/"
495 version "/src/snorenotify-" version ".tar.xz"))
496 (sha256
497 (base32
498 "0jz6ivk90h7iwgyxar7xzzj8yvzn6s1my6cqs9bdnwqswfk1nhbd"))))
499 (build-system cmake-build-system)
500 (arguments
501 `(#:tests? #f)) ; both tests fail, require display
502 (inputs
503 `(("extra-cmake-modules" ,extra-cmake-modules)
504 ("qtbase" ,qtbase)
505 ("qttools" ,qttools)))
506 (home-page "https://techbase.kde.org/Projects/Snorenotify")
507 (synopsis "Qt notification framework")
508 (description "Snorenotify is a multi platform Qt notification framework.
509 Using a plugin system it is possible to create notifications with many
510 different notification systems.")
511 (license license:lgpl3)))