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>
13 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
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"))
63 (version (string-append "2.4.1-" (string-take commit 8)))
68 (url "https://github.com/HowardHinnant/date")
69 (commit "9a0ee2542848ab8625984fc8cdbfb9b5414c0082")))
70 (file-name (git-file-name name version))
72 (base32 "0yxsn0hj22n61bjywysxqgfv7hj5xvsl6isma95fl8xrimpny083"))
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)
80 '(#:configure-flags (list "-DUSE_SYSTEM_TZ_DB=ON"
81 "-DBUILD_SHARED_LIBS=ON"
83 "-DENABLE_DATE_TESTING=ON")
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")))
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")))
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))))
112 (define-public libical
119 "https://github.com/libical/libical/releases/download/v"
120 version "/libical-" version ".tar.gz"))
123 "0vr8s7hn8204lyc4ys5bs3j5qss4lmc9ffly2m1a59avyz5cmzh9"))))
124 (build-system cmake-build-system)
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")
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\\\"") "")))
147 `(("gobject-introspection" ,gobject-introspection)
150 ("pkg-config" ,pkg-config)
157 ;; In Requires.private of libical.pc.
159 (home-page "https://libical.github.io/libical/")
160 (synopsis "iCalendar protocols and data formats implementation")
162 "Libical is an implementation of the iCalendar protocols and protocol
164 ;; Can be used with either license. See COPYING.
165 (license (list license:lgpl2.1 license:mpl2.0))))
173 (uri (pypi-uri "khal" version))
176 "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l"))
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")
186 "11nd8hkjz68imwqqn0p54zmb53z2pfxmzchaviy7jc1ky5s9l663")))))))
187 (build-system python-build-system)
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")
197 "doc/build/man/khal.1"
198 (string-append (assoc-ref outputs "out") "/share/man/man1"))
200 (add-before 'check 'fix-tests
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]\\'"))
207 (lambda* (#:key inputs #:allow-other-keys)
208 ;; The tests require us to choose a timezone.
210 (string-append (assoc-ref inputs "tzdata")
211 "/share/zoneinfo/Zulu"))
212 (invoke "py.test" "tests"))))))
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)))
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)))
238 (define-public remind
245 (uri (string-append "https://dianne.skoll.ca/projects/remind/download/"
247 (string-join (map (cut string-pad <> 2 #\0)
248 (string-split version #\.))
252 (base32 "0lgyc2j69aqqk4knywr8inz4fsnni0zq54dgqh7p4s6kzybc2mf9"))))
253 (build-system gnu-build-system)
255 '(#:tests? #f)) ; no "check" target
256 (home-page "https://dianne.skoll.ca/projects/remind/")
257 (synopsis "Sophisticated calendar and alarm program")
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)))
266 (define-public libhdate
273 (uri (string-append "mirror://sourceforge/libhdate/libhdate/libhdate-"
274 version "/" name "-" version ".tar.bz2"))
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+)))
287 (define-public confclerk
294 (uri (string-append "https://www.toastfreeware.priv.at/tarballs/"
295 "confclerk/confclerk-" version ".tar.gz"))
298 "10rhg44px4nvbkd3p341cmp2ds43jn8r4rvgladda9v8zmsgr2b3"))))
299 (build-system gnu-build-system)
302 (modify-phases %standard-phases
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")))
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"))
322 #:tests? #f)) ; no tests
324 `(("perl" ,perl))) ; pod2man
326 `(("qtbase" ,qtbase)))
327 (home-page "https://www.toastfreeware.priv.at/confclerk")
328 (synopsis "Offline conference schedule application")
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.
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.
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/*