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> |
696cb41b | 7 | ;;; Copyright © 2016 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> |
e5326da4 DT |
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) | |
1eaba63f | 30 | #:use-module ((guix licenses) #:prefix license:) |
1afd98dc | 31 | #:use-module (guix git-download) |
e5326da4 DT |
32 | #:use-module (guix packages) |
33 | #:use-module (guix download) | |
696cb41b | 34 | #:use-module (guix build-system gnu) |
e5326da4 | 35 | #:use-module (guix build-system cmake) |
78e6c4a8 LF |
36 | #:use-module (guix build-system python) |
37 | #:use-module (gnu packages base) | |
ac257f12 | 38 | #:use-module (gnu packages check) |
78e6c4a8 LF |
39 | #:use-module (gnu packages dav) |
40 | #:use-module (gnu packages freedesktop) | |
09183df2 | 41 | #:use-module (gnu packages glib) |
123e429e | 42 | #:use-module (gnu packages gnome) |
ab6693c4 | 43 | #:use-module (gnu packages gtk) |
e5326da4 | 44 | #:use-module (gnu packages icu4c) |
78e6c4a8 | 45 | #:use-module (gnu packages perl) |
09183df2 | 46 | #:use-module (gnu packages pkg-config) |
696cb41b | 47 | #:use-module (gnu packages python) |
44d10b1f | 48 | #:use-module (gnu packages python-xyz) |
a9a2742b | 49 | #:use-module (gnu packages qt) |
9d0c291e | 50 | #:use-module (gnu packages sphinx) |
cd0322a3 | 51 | #:use-module (gnu packages sqlite) |
33dc54b0 | 52 | #:use-module (gnu packages time) |
09183df2 | 53 | #:use-module (gnu packages xml) |
696cb41b | 54 | #:use-module (srfi srfi-26)) |
e5326da4 | 55 | |
1afd98dc BT |
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 | |
b0e7b699 | 68 | (url "https://github.com/HowardHinnant/date") |
1afd98dc BT |
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 | ||
e5326da4 DT |
112 | (define-public libical |
113 | (package | |
114 | (name "libical") | |
3b14288d | 115 | (version "3.0.8") |
e5326da4 DT |
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 | |
3b14288d | 123 | "0vr8s7hn8204lyc4ys5bs3j5qss4lmc9ffly2m1a59avyz5cmzh9")))) |
e5326da4 DT |
124 | (build-system cmake-build-system) |
125 | (arguments | |
22c161d0 | 126 | '(#:tests? #f ; test suite appears broken |
123e429e KK |
127 | #:configure-flags '("-DSHARED_ONLY=true" |
128 | ;; required by evolution-data-server | |
129 | "-DGOBJECT_INTROSPECTION=true" | |
130 | "-DICAL_GLIB_VAPI=true") | |
22c161d0 KY |
131 | #:phases |
132 | (modify-phases %standard-phases | |
133 | (add-before 'configure 'patch-paths | |
09183df2 | 134 | (lambda* (#:key inputs #:allow-other-keys) |
20fe3cd7 MB |
135 | ;; TODO: libical 3.1.0 supports using TZDIR instead of a hard-coded |
136 | ;; zoneinfo database. When that is released we can drop | |
09183df2 MB |
137 | ;; the tzdata dependency. |
138 | (let ((tzdata (assoc-ref inputs "tzdata"))) | |
22c161d0 | 139 | (substitute* "src/libical/icaltz-util.c" |
be81133a LF |
140 | (("\\\"/usr/share/zoneinfo\\\",") |
141 | (string-append "\"" tzdata "/share/zoneinfo\"")) | |
142 | (("\\\"/usr/lib/zoneinfo\\\",") "") | |
143 | (("\\\"/etc/zoneinfo\\\",") "") | |
144 | (("\\\"/usr/share/lib/zoneinfo\\\"") ""))) | |
22c161d0 | 145 | #t))))) |
e5326da4 | 146 | (native-inputs |
123e429e KK |
147 | `(("gobject-introspection" ,gobject-introspection) |
148 | ("gtk-doc" ,gtk-doc) | |
ab6693c4 | 149 | ("perl" ,perl) |
123e429e KK |
150 | ("pkg-config" ,pkg-config) |
151 | ("vala" ,vala))) | |
e5326da4 | 152 | (inputs |
09183df2 MB |
153 | `(("glib" ,glib) |
154 | ("libxml2" ,libxml2) | |
22c161d0 | 155 | ("tzdata" ,tzdata))) |
09183df2 MB |
156 | (propagated-inputs |
157 | ;; In Requires.private of libical.pc. | |
158 | `(("icu4c" ,icu4c))) | |
e5326da4 DT |
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.") | |
09183df2 MB |
164 | ;; Can be used with either license. See COPYING. |
165 | (license (list license:lgpl2.1 license:mpl2.0)))) | |
78e6c4a8 LF |
166 | |
167 | (define-public khal | |
168 | (package | |
169 | (name "khal") | |
2125cf62 | 170 | (version "0.10.1") |
78e6c4a8 LF |
171 | (source (origin |
172 | (method url-fetch) | |
173 | (uri (pypi-uri "khal" version)) | |
174 | (sha256 | |
175 | (base32 | |
b9dd2a2f EF |
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"))))))) | |
78e6c4a8 LF |
187 | (build-system python-build-system) |
188 | (arguments | |
189 | `(#:phases (modify-phases %standard-phases | |
78e6c4a8 LF |
190 | ;; Building the manpage requires khal to be installed. |
191 | (add-after 'install 'manpage | |
32212074 HG |
192 | (lambda* (#:key inputs outputs #:allow-other-keys) |
193 | ;; Make installed package available for running the tests | |
194 | (add-installed-pythonpath inputs outputs) | |
6c738fe9 TGR |
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)) | |
2597e47d TLC |
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)) | |
78e6c4a8 LF |
206 | (replace 'check |
207 | (lambda* (#:key inputs #:allow-other-keys) | |
3202d601 | 208 | ;; The tests require us to choose a timezone. |
78e6c4a8 LF |
209 | (setenv "TZ" |
210 | (string-append (assoc-ref inputs "tzdata") | |
211 | "/share/zoneinfo/Zulu")) | |
6e1f91d9 | 212 | (invoke "py.test" "tests")))))) |
78e6c4a8 | 213 | (native-inputs |
928da609 | 214 | `(("python-pytest" ,python-pytest) |
bc8273d0 | 215 | ("python-pytest-cov" ,python-pytest-cov) |
78e6c4a8 LF |
216 | ("python-setuptools-scm" ,python-setuptools-scm) |
217 | ;; Required for tests | |
bc8273d0 | 218 | ("python-freezegun" ,python-freezegun) |
6e1f91d9 | 219 | ("tzdata" ,tzdata-for-tests) |
46f3c8f2 | 220 | ("vdirsyncer" ,vdirsyncer) |
78e6c4a8 LF |
221 | ;; Required to build manpage |
222 | ("python-sphinxcontrib-newsfeed" ,python-sphinxcontrib-newsfeed) | |
223 | ("python-sphinx" ,python-sphinx))) | |
224 | (inputs | |
c135577d EF |
225 | `(("sqlite" ,sqlite) |
226 | ("python-configobj" ,python-configobj) | |
22d7360b | 227 | ("python-dateutil" ,python-dateutil) |
78e6c4a8 LF |
228 | ("python-icalendar" ,python-icalendar) |
229 | ("python-tzlocal" ,python-tzlocal) | |
230 | ("python-urwid" ,python-urwid) | |
46f3c8f2 | 231 | ("python-pyxdg" ,python-pyxdg))) |
78e6c4a8 LF |
232 | (synopsis "Console calendar program") |
233 | (description "Khal is a standards based console calendar program, | |
234 | able to synchronize with CalDAV servers through vdirsyncer.") | |
5309c3a1 | 235 | (home-page "https://lostpackets.de/khal/") |
1eaba63f | 236 | (license license:expat))) |
696cb41b SR |
237 | |
238 | (define-public remind | |
239 | (package | |
240 | (name "remind") | |
e3ce8fbf | 241 | (version "3.1.17") |
696cb41b SR |
242 | (source |
243 | (origin | |
244 | (method url-fetch) | |
88888cd0 | 245 | (uri (string-append "https://dianne.skoll.ca/projects/remind/download/" |
696cb41b SR |
246 | "remind-" |
247 | (string-join (map (cut string-pad <> 2 #\0) | |
248 | (string-split version #\.)) | |
249 | ".") | |
250 | ".tar.gz")) | |
251 | (sha256 | |
e3ce8fbf | 252 | (base32 "0lgyc2j69aqqk4knywr8inz4fsnni0zq54dgqh7p4s6kzybc2mf9")))) |
696cb41b SR |
253 | (build-system gnu-build-system) |
254 | (arguments | |
88888cd0 TGR |
255 | '(#:tests? #f)) ; no "check" target |
256 | (home-page "https://dianne.skoll.ca/projects/remind/") | |
696cb41b SR |
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.") | |
1eaba63f | 264 | (license license:gpl2))) |
585b72c6 EF |
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.") | |
1eaba63f | 285 | (license license:gpl3+))) |
a9a2742b EF |
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/* |