gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
[jackhill/guix/guix.git] / gnu / packages / calendar.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
3 ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
5 ;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com>
7 ;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
8 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com
10 ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
11 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages calendar)
29 #:use-module (gnu packages)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix git-download)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system cmake)
36 #:use-module (guix build-system python)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages dav)
40 #:use-module (gnu packages freedesktop)
41 #:use-module (gnu packages glib)
42 #:use-module (gnu packages gnome)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages icu4c)
45 #:use-module (gnu packages perl)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages python-xyz)
49 #:use-module (gnu packages qt)
50 #:use-module (gnu packages sphinx)
51 #:use-module (gnu packages sqlite)
52 #:use-module (gnu packages time)
53 #:use-module (gnu packages xml)
54 #:use-module (srfi srfi-26))
55
56 (define-public date
57 ;; We make the same choice as the Arch package maintainer by choosing a
58 ;; recent commit to fix some bugs.
59 ;; https://github.com/Alexays/Waybar/issues/565
60 (let ((commit "9a0ee2542848ab8625984fc8cdbfb9b5414c0082"))
61 (package
62 (name "date")
63 (version (string-append "2.4.1-" (string-take commit 8)))
64 (source
65 (origin
66 (method git-fetch)
67 (uri (git-reference
68 (url "https://github.com/HowardHinnant/date")
69 (commit "9a0ee2542848ab8625984fc8cdbfb9b5414c0082")))
70 (file-name (git-file-name name version))
71 (sha256
72 (base32 "0yxsn0hj22n61bjywysxqgfv7hj5xvsl6isma95fl8xrimpny083"))
73 (patches
74 ;; Install pkg-config files
75 ;; https://github.com/HowardHinnant/date/pull/538
76 (search-patches "date-output-pkg-config-files.patch"))))
77 (inputs `(("tzdata" ,tzdata)))
78 (build-system cmake-build-system)
79 (arguments
80 '(#:configure-flags (list "-DUSE_SYSTEM_TZ_DB=ON"
81 "-DBUILD_SHARED_LIBS=ON"
82 "-DBUILD_TZ_LIB=ON"
83 "-DENABLE_DATE_TESTING=ON")
84 #:phases
85 (modify-phases %standard-phases
86 (add-after 'unpack 'patch-bin-bash
87 (lambda* (#:key inputs #:allow-other-keys)
88 (substitute* "compile_fail.sh"
89 (("/bin/bash") (which "bash")))
90 #t))
91 (add-after 'unpack 'patch-zoneinfo-path
92 (lambda* (#:key inputs #:allow-other-keys)
93 (substitute* "src/tz.cpp"
94 (("/usr/share/zoneinfo")
95 (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
96 #t))
97 (replace 'check
98 (lambda _
99 ;; Disable test that requires checking timezone that
100 ;; isn't set in the build environment.
101 (substitute* "CTestTestfile.cmake"
102 (("add_test.tz_test_pass_zoned_time_deduction_test.*") "")
103 (("set_tests_properties.tz_test_pass_zoned_time_deduction_test.*") ""))
104 (invoke "make" "testit"))))))
105 (synopsis "Date and time library for C++11 and C++14")
106 (description "Date is a header only C++ library that extends the chrono
107 date algorithms library for calendar dates and durations. It also provides
108 the <tz.h> library for handling time zones and leap seconds.")
109 (home-page "https://howardhinnant.github.io/date/date.html")
110 (license license:expat))))
111
112 (define-public libical
113 (package
114 (name "libical")
115 (version "3.0.8")
116 (source (origin
117 (method url-fetch)
118 (uri (string-append
119 "https://github.com/libical/libical/releases/download/v"
120 version "/libical-" version ".tar.gz"))
121 (sha256
122 (base32
123 "0vr8s7hn8204lyc4ys5bs3j5qss4lmc9ffly2m1a59avyz5cmzh9"))))
124 (build-system cmake-build-system)
125 (arguments
126 '(#:tests? #f ; test suite appears broken
127 #:configure-flags '("-DSHARED_ONLY=true"
128 ;; required by evolution-data-server
129 "-DGOBJECT_INTROSPECTION=true"
130 "-DICAL_GLIB_VAPI=true")
131 #:phases
132 (modify-phases %standard-phases
133 (add-before 'configure 'patch-paths
134 (lambda* (#:key inputs #:allow-other-keys)
135 ;; TODO: libical 3.1.0 supports using TZDIR instead of a hard-coded
136 ;; zoneinfo database. When that is released we can drop
137 ;; the tzdata dependency.
138 (let ((tzdata (assoc-ref inputs "tzdata")))
139 (substitute* "src/libical/icaltz-util.c"
140 (("\\\"/usr/share/zoneinfo\\\",")
141 (string-append "\"" tzdata "/share/zoneinfo\""))
142 (("\\\"/usr/lib/zoneinfo\\\",") "")
143 (("\\\"/etc/zoneinfo\\\",") "")
144 (("\\\"/usr/share/lib/zoneinfo\\\"") "")))
145 #t)))))
146 (native-inputs
147 `(("gobject-introspection" ,gobject-introspection)
148 ("gtk-doc" ,gtk-doc)
149 ("perl" ,perl)
150 ("pkg-config" ,pkg-config)
151 ("vala" ,vala)))
152 (inputs
153 `(("glib" ,glib)
154 ("libxml2" ,libxml2)
155 ("tzdata" ,tzdata)))
156 (propagated-inputs
157 ;; In Requires.private of libical.pc.
158 `(("icu4c" ,icu4c)))
159 (home-page "https://libical.github.io/libical/")
160 (synopsis "iCalendar protocols and data formats implementation")
161 (description
162 "Libical is an implementation of the iCalendar protocols and protocol
163 data units.")
164 ;; Can be used with either license. See COPYING.
165 (license (list license:lgpl2.1 license:mpl2.0))))
166
167 (define-public khal
168 (package
169 (name "khal")
170 (version "0.10.1")
171 (source (origin
172 (method url-fetch)
173 (uri (pypi-uri "khal" version))
174 (sha256
175 (base32
176 "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l"))
177 (patches
178 (list
179 (origin
180 (method url-fetch)
181 ;; This patch fixes an issue with python-urwid-2.1.0
182 (uri "https://github.com/pimutils/khal/commit/2c5990c2de2015b251ba23617faa40ee11b8c22a.patch")
183 (file-name "khal-compat-urwid-2.1.0.patch")
184 (sha256
185 (base32
186 "11nd8hkjz68imwqqn0p54zmb53z2pfxmzchaviy7jc1ky5s9l663")))))))
187 (build-system python-build-system)
188 (arguments
189 `(#:phases (modify-phases %standard-phases
190 ;; Building the manpage requires khal to be installed.
191 (add-after 'install 'manpage
192 (lambda* (#:key inputs outputs #:allow-other-keys)
193 ;; Make installed package available for running the tests
194 (add-installed-pythonpath inputs outputs)
195 (invoke "make" "--directory=doc/" "man")
196 (install-file
197 "doc/build/man/khal.1"
198 (string-append (assoc-ref outputs "out") "/share/man/man1"))
199 #t))
200 (add-before 'check 'fix-tests
201 (lambda _
202 ;; Reported upstream: <https://github.com/pimutils/khal/issues/947>.
203 (substitute* "tests/cli_test.py"
204 (("Invalid value for \"\\[ICS\\]\"") "Invalid value for \\'[ICS]\\'"))
205 #t))
206 (replace 'check
207 (lambda* (#:key inputs #:allow-other-keys)
208 ;; The tests require us to choose a timezone.
209 (setenv "TZ"
210 (string-append (assoc-ref inputs "tzdata")
211 "/share/zoneinfo/Zulu"))
212 (invoke "py.test" "tests"))))))
213 (native-inputs
214 `(("python-pytest" ,python-pytest)
215 ("python-pytest-cov" ,python-pytest-cov)
216 ("python-setuptools-scm" ,python-setuptools-scm)
217 ;; Required for tests
218 ("python-freezegun" ,python-freezegun)
219 ("tzdata" ,tzdata-for-tests)
220 ("vdirsyncer" ,vdirsyncer)
221 ;; Required to build manpage
222 ("python-sphinxcontrib-newsfeed" ,python-sphinxcontrib-newsfeed)
223 ("python-sphinx" ,python-sphinx)))
224 (inputs
225 `(("sqlite" ,sqlite)
226 ("python-configobj" ,python-configobj)
227 ("python-dateutil" ,python-dateutil)
228 ("python-icalendar" ,python-icalendar)
229 ("python-tzlocal" ,python-tzlocal)
230 ("python-urwid" ,python-urwid)
231 ("python-pyxdg" ,python-pyxdg)))
232 (synopsis "Console calendar program")
233 (description "Khal is a standards based console calendar program,
234 able to synchronize with CalDAV servers through vdirsyncer.")
235 (home-page "https://lostpackets.de/khal/")
236 (license license:expat)))
237
238 (define-public remind
239 (package
240 (name "remind")
241 (version "3.1.17")
242 (source
243 (origin
244 (method url-fetch)
245 (uri (string-append "https://dianne.skoll.ca/projects/remind/download/"
246 "remind-"
247 (string-join (map (cut string-pad <> 2 #\0)
248 (string-split version #\.))
249 ".")
250 ".tar.gz"))
251 (sha256
252 (base32 "0lgyc2j69aqqk4knywr8inz4fsnni0zq54dgqh7p4s6kzybc2mf9"))))
253 (build-system gnu-build-system)
254 (arguments
255 '(#:tests? #f)) ; no "check" target
256 (home-page "https://dianne.skoll.ca/projects/remind/")
257 (synopsis "Sophisticated calendar and alarm program")
258 (description
259 "Remind allows you to remind yourself of upcoming events and appointments.
260 Each reminder or alarm can consist of a message sent to standard output, or a
261 program to be executed. It also features: sophisticated date calculation,
262 moon phases, sunrise/sunset, Hebrew calendar, alarms, PostScript output and
263 proper handling of holidays.")
264 (license license:gpl2)))
265
266 (define-public libhdate
267 (package
268 (name "libhdate")
269 (version "1.6.02")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (string-append "mirror://sourceforge/libhdate/libhdate/libhdate-"
274 version "/" name "-" version ".tar.bz2"))
275 (sha256
276 (base32
277 "0qkpq412p78znw8gckwcx3l0wcss9s0dgw1pvjb1ih2pxf6hm4rw"))))
278 (build-system gnu-build-system)
279 (home-page "http://libhdate.sourceforge.net/")
280 (synopsis "Library to use Hebrew dates")
281 (description "LibHdate is a small library for the Hebrew calendar and times
282 of day, written in C, and including bindings for C++, pascal, perl, php, python,
283 and ruby. It includes two illustrative command-line programs, @code{hcal} and
284 @code{hdate}, and some snippets and scripts written in the binding languages.")
285 (license license:gpl3+)))
286
287 (define-public confclerk
288 (package
289 (name "confclerk")
290 (version "0.6.4")
291 (source
292 (origin
293 (method url-fetch)
294 (uri (string-append "https://www.toastfreeware.priv.at/tarballs/"
295 "confclerk/confclerk-" version ".tar.gz"))
296 (sha256
297 (base32
298 "10rhg44px4nvbkd3p341cmp2ds43jn8r4rvgladda9v8zmsgr2b3"))))
299 (build-system gnu-build-system)
300 (arguments
301 '(#:phases
302 (modify-phases %standard-phases
303 (replace 'configure
304 (lambda* (#:key outputs #:allow-other-keys)
305 (let ((out (assoc-ref outputs "out")))
306 ;; Install directory is currently hard-coded.
307 (substitute* "src/app/app.pro"
308 (("PREFIX = /usr/bin")
309 (string-append "PREFIX =" out "/bin")))
310 (invoke "qmake"))))
311 (add-after 'install 'install-docs
312 (lambda* (#:key outputs #:allow-other-keys)
313 (let* ((out (assoc-ref outputs "out"))
314 (share (string-append out "/share")))
315 (install-file "data/confclerk.1"
316 (string-append share "/man/man1"))
317 (install-file "data/confclerk.desktop"
318 (string-append share "/applications"))
319 (install-file "data/confclerk.svg"
320 (string-append share "/icons/hicolor/scalable/apps"))
321 #t))))
322 #:tests? #f)) ; no tests
323 (native-inputs
324 `(("perl" ,perl))) ; pod2man
325 (inputs
326 `(("qtbase" ,qtbase)))
327 (home-page "https://www.toastfreeware.priv.at/confclerk")
328 (synopsis "Offline conference schedule application")
329 (description
330 "ConfClerk is an application written in Qt, which makes conference schedules
331 available offline. It displays the conference schedule from various views,
332 support searches on various items (speaker, speech topic, location, etc.) and
333 enables you to select favorite events and create your own schedule.
334
335 At the moment ConfClerk is able to import schedules in XML format created by
336 the PentaBarf conference management system (or frab) used by e.g. FOSDEM,
337 DebConf, FrOSCon, Grazer LinuxTage, and the CCC congresses.
338
339 ConfClerk is targeted at mobile devices but works on any system running Qt.")
340 (license (list license:gpl2+
341 license:lgpl3)))) ; or cc-by3.0 for src/icons/*