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>
14 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
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"))
65 (version (string-append "2.4.1-" (string-take commit 8)))
70 (url "https://github.com/HowardHinnant/date")
71 (commit "9a0ee2542848ab8625984fc8cdbfb9b5414c0082")))
72 (file-name (git-file-name name version))
74 (base32 "0yxsn0hj22n61bjywysxqgfv7hj5xvsl6isma95fl8xrimpny083"))
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)
82 '(#:configure-flags (list "-DUSE_SYSTEM_TZ_DB=ON"
83 "-DBUILD_SHARED_LIBS=ON"
85 "-DENABLE_DATE_TESTING=ON")
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")))
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")))
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))))
114 (define-public libical
121 "https://github.com/libical/libical/releases/download/v"
122 version "/libical-" version ".tar.gz"))
125 "0vr8s7hn8204lyc4ys5bs3j5qss4lmc9ffly2m1a59avyz5cmzh9"))))
126 (build-system cmake-build-system)
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")
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/")))
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\\\"") "")))
157 `(("docbook-xml" ,docbook-xml-4.3)
158 ("gobject-introspection" ,gobject-introspection)
159 ("gtk-doc" ,gtk-doc/stable)
161 ("pkg-config" ,pkg-config)
168 ;; In Requires.private of libical.pc.
170 (home-page "https://libical.github.io/libical/")
171 (synopsis "iCalendar protocols and data formats implementation")
173 "Libical is an implementation of the iCalendar protocols and protocol
175 ;; Can be used with either license. See COPYING.
176 (license (list license:lgpl2.1 license:mpl2.0))))
184 (uri (pypi-uri "khal" version))
187 "11qhrga44knlnp88py9p547d4nr5kn041d2nszwa3dqw7mf22ks9"))))
188 (build-system python-build-system)
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")
199 "doc/build/man/khal.1"
200 (string-append (assoc-ref outputs "out") "/share/man/man1"))
203 `(("python-setuptools-scm" ,python-setuptools-scm)
204 ;; Required to build manpage
205 ("python-sphinxcontrib-newsfeed" ,python-sphinxcontrib-newsfeed)
206 ("python-sphinx" ,python-sphinx)))
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)))
226 (define-public remind
233 (uri (string-append "https://dianne.skoll.ca/projects/remind/download/"
235 (string-join (map (cut string-pad <> 2 #\0)
236 (string-split version #\.))
240 (base32 "1hbfsq6444abkiws28xqy0k9cwzgzfi1hwfmd1rgm4yydgc1gvb1"))))
241 (build-system gnu-build-system)
243 '(#:tests? #f)) ; no "check" target
244 (home-page "https://dianne.skoll.ca/projects/remind/")
245 (synopsis "Sophisticated calendar and alarm program")
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)))
254 (define-public libhdate
261 (uri (string-append "mirror://sourceforge/libhdate/libhdate/libhdate-"
262 version "/" name "-" version ".tar.bz2"))
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+)))
275 (define-public confclerk
282 (uri (string-append "https://www.toastfreeware.priv.at/tarballs/"
283 "confclerk/confclerk-" version ".tar.gz"))
286 "10rhg44px4nvbkd3p341cmp2ds43jn8r4rvgladda9v8zmsgr2b3"))))
287 (build-system gnu-build-system)
290 (modify-phases %standard-phases
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")))
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"))
310 #:tests? #f)) ; no tests
312 `(("perl" ,perl))) ; pod2man
314 `(("qtbase" ,qtbase)))
315 (home-page "https://www.toastfreeware.priv.at/confclerk")
316 (synopsis "Offline conference schedule application")
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.
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.
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/*
337 (uri (string-append "http://ccal.chinesebay.com/ccal/ccal-"
341 "15nza1d1lvk3dp0wcl53wsd32yhbgyzznha092mh5kh5z74vsk1x"))))
342 (build-system gnu-build-system)
345 (modify-phases %standard-phases
347 (lambda* (#:key outputs #:allow-other-keys)
348 (let ((out (assoc-ref outputs "out")))
349 (substitute* "Makefile"
351 (string-append out "/bin"))
353 (string-append out "/share/man"))))
355 (add-after 'install 'install-manuals
357 (invoke "make" "install-man"))))
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+))))