Commit | Line | Data |
---|---|---|
e5326da4 DT |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 David Thompson <davet@gnu.org> | |
be81133a | 3 | ;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name> |
3c8ba11a | 4 | ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net> |
a9a2742b | 5 | ;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il> |
bc8273d0 | 6 | ;;; Copyright © 2016 Troy Sankey <sankeytms@gmail.com> |
2820b1f9 | 7 | ;;; Copyright © 2016, 2021 Stefan Reichoer <stefan@xsteve.at> |
88888cd0 | 8 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
20fe3cd7 | 9 | ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com |
1afd98dc | 10 | ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot> |
2597e47d | 11 | ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org> |
6b981881 | 12 | ;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net> |
e5326da4 DT |
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) | |
1eaba63f | 31 | #:use-module ((guix licenses) #:prefix license:) |
1afd98dc | 32 | #:use-module (guix git-download) |
e5326da4 DT |
33 | #:use-module (guix packages) |
34 | #:use-module (guix download) | |
696cb41b | 35 | #:use-module (guix build-system gnu) |
e5326da4 | 36 | #:use-module (guix build-system cmake) |
78e6c4a8 LF |
37 | #:use-module (guix build-system python) |
38 | #:use-module (gnu packages base) | |
ac257f12 | 39 | #:use-module (gnu packages check) |
78e6c4a8 | 40 | #:use-module (gnu packages dav) |
17e88168 | 41 | #:use-module (gnu packages docbook) |
78e6c4a8 | 42 | #:use-module (gnu packages freedesktop) |
09183df2 | 43 | #:use-module (gnu packages glib) |
123e429e | 44 | #:use-module (gnu packages gnome) |
ab6693c4 | 45 | #:use-module (gnu packages gtk) |
e5326da4 | 46 | #:use-module (gnu packages icu4c) |
78e6c4a8 | 47 | #:use-module (gnu packages perl) |
09183df2 | 48 | #:use-module (gnu packages pkg-config) |
696cb41b | 49 | #:use-module (gnu packages python) |
44d10b1f | 50 | #:use-module (gnu packages python-xyz) |
a9a2742b | 51 | #:use-module (gnu packages qt) |
9d0c291e | 52 | #:use-module (gnu packages sphinx) |
cd0322a3 | 53 | #:use-module (gnu packages sqlite) |
33dc54b0 | 54 | #:use-module (gnu packages time) |
09183df2 | 55 | #:use-module (gnu packages xml) |
696cb41b | 56 | #:use-module (srfi srfi-26)) |
e5326da4 | 57 | |
1afd98dc BT |
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 | |
b0e7b699 | 70 | (url "https://github.com/HowardHinnant/date") |
1afd98dc BT |
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 | ||
e5326da4 DT |
114 | (define-public libical |
115 | (package | |
116 | (name "libical") | |
3b14288d | 117 | (version "3.0.8") |
e5326da4 DT |
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 | |
3b14288d | 125 | "0vr8s7hn8204lyc4ys5bs3j5qss4lmc9ffly2m1a59avyz5cmzh9")))) |
e5326da4 DT |
126 | (build-system cmake-build-system) |
127 | (arguments | |
22c161d0 | 128 | '(#:tests? #f ; test suite appears broken |
2960d31a | 129 | #:parallel-build? #f ;may cause GIR generation failure |
123e429e KK |
130 | #:configure-flags '("-DSHARED_ONLY=true" |
131 | ;; required by evolution-data-server | |
132 | "-DGOBJECT_INTROSPECTION=true" | |
133 | "-DICAL_GLIB_VAPI=true") | |
22c161d0 KY |
134 | #:phases |
135 | (modify-phases %standard-phases | |
17e88168 EF |
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)) | |
22c161d0 | 143 | (add-before 'configure 'patch-paths |
09183df2 | 144 | (lambda* (#:key inputs #:allow-other-keys) |
20fe3cd7 MB |
145 | ;; TODO: libical 3.1.0 supports using TZDIR instead of a hard-coded |
146 | ;; zoneinfo database. When that is released we can drop | |
09183df2 MB |
147 | ;; the tzdata dependency. |
148 | (let ((tzdata (assoc-ref inputs "tzdata"))) | |
22c161d0 | 149 | (substitute* "src/libical/icaltz-util.c" |
be81133a LF |
150 | (("\\\"/usr/share/zoneinfo\\\",") |
151 | (string-append "\"" tzdata "/share/zoneinfo\"")) | |
152 | (("\\\"/usr/lib/zoneinfo\\\",") "") | |
153 | (("\\\"/etc/zoneinfo\\\",") "") | |
154 | (("\\\"/usr/share/lib/zoneinfo\\\"") ""))) | |
22c161d0 | 155 | #t))))) |
e5326da4 | 156 | (native-inputs |
17e88168 EF |
157 | `(("docbook-xml" ,docbook-xml-4.3) |
158 | ("gobject-introspection" ,gobject-introspection) | |
9dea1618 | 159 | ("gtk-doc" ,gtk-doc/stable) |
ab6693c4 | 160 | ("perl" ,perl) |
123e429e KK |
161 | ("pkg-config" ,pkg-config) |
162 | ("vala" ,vala))) | |
e5326da4 | 163 | (inputs |
09183df2 MB |
164 | `(("glib" ,glib) |
165 | ("libxml2" ,libxml2) | |
22c161d0 | 166 | ("tzdata" ,tzdata))) |
09183df2 MB |
167 | (propagated-inputs |
168 | ;; In Requires.private of libical.pc. | |
169 | `(("icu4c" ,icu4c))) | |
e5326da4 DT |
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.") | |
09183df2 MB |
175 | ;; Can be used with either license. See COPYING. |
176 | (license (list license:lgpl2.1 license:mpl2.0)))) | |
78e6c4a8 LF |
177 | |
178 | (define-public khal | |
179 | (package | |
180 | (name "khal") | |
21955a54 | 181 | (version "0.10.2") |
78e6c4a8 | 182 | (source (origin |
21955a54 LDB |
183 | (method url-fetch) |
184 | (uri (pypi-uri "khal" version)) | |
185 | (sha256 | |
186 | (base32 | |
187 | "11qhrga44knlnp88py9p547d4nr5kn041d2nszwa3dqw7mf22ks9")))) | |
78e6c4a8 LF |
188 | (build-system python-build-system) |
189 | (arguments | |
6bfbdc94 LF |
190 | `(#:tests? #f ; The test suite is unreliable. See <https://bugs.gnu.org/44197> |
191 | #:phases (modify-phases %standard-phases | |
78e6c4a8 LF |
192 | ;; Building the manpage requires khal to be installed. |
193 | (add-after 'install 'manpage | |
32212074 HG |
194 | (lambda* (#:key inputs outputs #:allow-other-keys) |
195 | ;; Make installed package available for running the tests | |
196 | (add-installed-pythonpath inputs outputs) | |
6c738fe9 TGR |
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")) | |
6bfbdc94 | 201 | #t))))) |
78e6c4a8 | 202 | (native-inputs |
6bfbdc94 | 203 | `(("python-setuptools-scm" ,python-setuptools-scm) |
78e6c4a8 LF |
204 | ;; Required to build manpage |
205 | ("python-sphinxcontrib-newsfeed" ,python-sphinxcontrib-newsfeed) | |
206 | ("python-sphinx" ,python-sphinx))) | |
207 | (inputs | |
c135577d EF |
208 | `(("sqlite" ,sqlite) |
209 | ("python-configobj" ,python-configobj) | |
22d7360b | 210 | ("python-dateutil" ,python-dateutil) |
78e6c4a8 LF |
211 | ("python-icalendar" ,python-icalendar) |
212 | ("python-tzlocal" ,python-tzlocal) | |
213 | ("python-urwid" ,python-urwid) | |
21955a54 LDB |
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) | |
46f3c8f2 | 219 | ("python-pyxdg" ,python-pyxdg))) |
78e6c4a8 LF |
220 | (synopsis "Console calendar program") |
221 | (description "Khal is a standards based console calendar program, | |
222 | able to synchronize with CalDAV servers through vdirsyncer.") | |
5309c3a1 | 223 | (home-page "https://lostpackets.de/khal/") |
1eaba63f | 224 | (license license:expat))) |
696cb41b SR |
225 | |
226 | (define-public remind | |
227 | (package | |
228 | (name "remind") | |
2820b1f9 | 229 | (version "3.3.5") |
696cb41b SR |
230 | (source |
231 | (origin | |
232 | (method url-fetch) | |
88888cd0 | 233 | (uri (string-append "https://dianne.skoll.ca/projects/remind/download/" |
696cb41b SR |
234 | "remind-" |
235 | (string-join (map (cut string-pad <> 2 #\0) | |
236 | (string-split version #\.)) | |
237 | ".") | |
238 | ".tar.gz")) | |
239 | (sha256 | |
2820b1f9 | 240 | (base32 "1hbfsq6444abkiws28xqy0k9cwzgzfi1hwfmd1rgm4yydgc1gvb1")))) |
696cb41b SR |
241 | (build-system gnu-build-system) |
242 | (arguments | |
88888cd0 TGR |
243 | '(#:tests? #f)) ; no "check" target |
244 | (home-page "https://dianne.skoll.ca/projects/remind/") | |
696cb41b SR |
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.") | |
1eaba63f | 252 | (license license:gpl2))) |
585b72c6 EF |
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.") | |
1eaba63f | 273 | (license license:gpl3+))) |
a9a2742b EF |
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/* | |
6b981881 PMY |
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+)))) |