gnu: Add kmbox.
[jackhill/guix/guix.git] / gnu / packages / kde-pim.scm
CommitLineData
e35b50ec
HG
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017, 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages kde-pim)
20 #:use-module (guix build-system qt)
21 #:use-module (guix download)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix utils)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages boost)
27 #:use-module (gnu packages databases)
28 #:use-module (gnu packages documentation)
29 #:use-module (gnu packages gnome)
30 #:use-module (gnu packages kde-frameworks)
31 #:use-module (gnu packages qt)
32 #:use-module (gnu packages sqlite)
33 #:use-module (gnu packages xml))
34
35(define-public akonadi
36 (package
37 (name "akonadi")
38 (version "19.08.3")
39 (source
40 (origin
41 (method url-fetch)
42 (uri (string-append "mirror://kde/stable/applications/" version
43 "/src/akonadi-" version ".tar.xz"))
44 (sha256
45 (base32 "0v7f1049wjnqxhwxr1443wc2cfbdqmf15xcwjz3j1m0vgdva9pyg"))
46 (patches (search-patches
47 "akonadi-paths.patch"
48 "akonadi-timestamps.patch"
49 "akonadi-Revert-Make-installation-properly-relocatabl.patch"))))
50 (build-system qt-build-system)
51 (native-inputs
52 `(("extra-cmake-modules" ,extra-cmake-modules)
53 ("qttools" ,qttools)
54 ("shared-mime-info" ,shared-mime-info)))
55 (inputs
56 `(("boost" ,boost)
57 ("kconfig" ,kconfig)
58 ("kconfigwidgets" ,kconfigwidgets)
59 ("kcoreaddons" ,kcoreaddons)
60 ("kcrash" ,kcrash)
61 ("kdbusaddons" ,kdbusaddons)
62 ("kdesignerplugin" ,kdesignerplugin)
63 ("ki18n" ,ki18n)
64 ("kiconthemes" ,kiconthemes)
65 ("kio" ,kio)
66 ("kitemmodels" ,kitemmodels)
67 ("kitemviews" ,kitemviews)
68 ("kwidgetsaddons" ,kwidgetsaddons)
69 ("kwindowsystem" ,kwindowsystem)
70 ("kxmlgui" ,kxmlgui)
71 ("libxml2" ,libxml2)
72 ("libxslt" ,libxslt)
73 ;; Do NOT add mysql or postgresql to the inputs. Otherwise the binaries
74 ;; and wrapped files will refer to them, even if the user choices none
75 ;; of these. Executables are searched on $PATH then.
76 ("qtbase" ,qtbase)
77 ("sqlite" ,sqlite)))
78 (arguments
79 `(#:tests? #f ;; TODO 135/167 tests fail
80 #:configure-flags '("-DDATABASE_BACKEND=SQLITE") ; lightweight
81 #:modules ((ice-9 textual-ports)
82 ,@%qt-build-system-modules)
83 #:phases
84 (modify-phases (@ (guix build qt-build-system) %standard-phases)
85 (add-before 'configure 'add-definitions
86 (lambda _
87 (let ((out (assoc-ref %outputs "out"))
88 (mysql (assoc-ref %build-inputs "mysql"))
89 (pgsql (assoc-ref %build-inputs "postgresql")))
90 (with-output-to-file "CMakeLists.txt.new"
91 (lambda _
92 (display
93 (string-append
94 "add_compile_definitions(\n"
95 "NIX_OUT=\"" out "\"\n"
96 ;; pin binaries for mysql backend
97 ")\n\n"))
98 (display
99 (call-with-input-file "CMakeLists.txt"
100 get-string-all))))
101 (rename-file "CMakeLists.txt.new" "CMakeLists.txt"))
102 #t)))))
103 (home-page "https://kontact.kde.org/components/akonadi.html")
104 (synopsis "Extensible cross-desktop storage service for PIM")
105 (description "Akonadi is an extensible cross-desktop Personal Information
106Management (PIM) storage service. It provides a common framework for
107applications to store and access mail, calendars, addressbooks, and other PIM
108data.
109
110This package contains the Akonadi PIM storage server and associated
111programs.")
112 (license license:fdl1.2+)))
7cfb118c 113
962b288a
HG
114(define-public kmbox
115 (package
116 (name "kmbox")
117 (version "19.08.3")
118 (source
119 (origin
120 (method url-fetch)
121 (uri (string-append "mirror://kde/stable/applications/" version
122 "/src/kmbox-" version ".tar.xz"))
123 (sha256
124 (base32 "13b5v1nx46k5ais3cms7yxrfi8p6xbljpkpg3f7v1asb6kshv7g2"))))
125 (build-system qt-build-system)
126 (native-inputs
127 `(("extra-cmake-modules" ,extra-cmake-modules)))
128 (inputs
129 `(("kcodecs" ,kcodecs)
130 ("kmime" ,kmime)
131 ("qtbase" ,qtbase)))
132 (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
133 (synopsis "Library for handling mbox mailboxes")
134 (description "A library for accessing mail storages in MBox format.")
135 (license license:lgpl2.0+ )))
136
7cfb118c
HG
137(define-public kmime
138 (package
139 (name "kmime")
140 (version "19.08.3")
141 (source
142 (origin
143 (method url-fetch)
144 (uri (string-append "mirror://kde/stable/applications/" version
145 "/src/kmime-" version ".tar.xz"))
146 (sha256
147 (base32 "1pc00pwwrngsyr7ppvqwfgvcgy2wiqdbqxhv9xidn4dw9way2ng6"))))
148 (build-system qt-build-system)
149 (native-inputs
150 `(("extra-cmake-modules" ,extra-cmake-modules)))
151 (inputs
152 `(("kcodecs" ,kcodecs)
153 ("ki18n" ,ki18n)
154 ("qtbase" ,qtbase)))
155 (arguments
156 `(#:phases
157 (modify-phases %standard-phases
158 (add-after 'unpack 'fix-test-case
159 (lambda _
160 ;; This is curious: autotests/CMakeLists.txt sets LC_TIME=C, but
161 ;; the Qt locale returns different. See kmime commit 3a9651d26a.
162 (substitute* "autotests/dateformattertest.cpp"
163 (("(Today|Yesterday) 12:34:56" line day)
164 (string-append day " 12:34 PM")))
165 #t)))))
166 (home-page "https://api.kde.org/stable/kdepimlibs-apidocs/")
167 (synopsis "Library for handling MIME data")
168 (description "A library for MIME handling.")
169 (license license:lgpl2.0+)))