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