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> |
523ecbbb | 5 | ;;; Copyright © 2016, 2017 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> |
e5326da4 DT |
9 | ;;; |
10 | ;;; This file is part of GNU Guix. | |
11 | ;;; | |
12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
13 | ;;; under the terms of the GNU General Public License as published by | |
14 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
15 | ;;; your option) any later version. | |
16 | ;;; | |
17 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ;;; GNU General Public License for more details. | |
21 | ;;; | |
22 | ;;; You should have received a copy of the GNU General Public License | |
23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
24 | ||
25 | (define-module (gnu packages calendar) | |
26 | #:use-module (gnu packages) | |
1eaba63f | 27 | #:use-module ((guix licenses) #:prefix license:) |
e5326da4 DT |
28 | #:use-module (guix packages) |
29 | #:use-module (guix download) | |
696cb41b | 30 | #:use-module (guix build-system gnu) |
e5326da4 | 31 | #:use-module (guix build-system cmake) |
78e6c4a8 LF |
32 | #:use-module (guix build-system python) |
33 | #:use-module (gnu packages base) | |
ac257f12 | 34 | #:use-module (gnu packages check) |
78e6c4a8 LF |
35 | #:use-module (gnu packages dav) |
36 | #:use-module (gnu packages freedesktop) | |
09183df2 | 37 | #:use-module (gnu packages glib) |
ab6693c4 | 38 | #:use-module (gnu packages gtk) |
e5326da4 | 39 | #:use-module (gnu packages icu4c) |
78e6c4a8 | 40 | #:use-module (gnu packages perl) |
09183df2 | 41 | #:use-module (gnu packages pkg-config) |
696cb41b | 42 | #:use-module (gnu packages python) |
44d10b1f | 43 | #:use-module (gnu packages python-xyz) |
9d0c291e | 44 | #:use-module (gnu packages sphinx) |
cd0322a3 | 45 | #:use-module (gnu packages sqlite) |
33dc54b0 | 46 | #:use-module (gnu packages time) |
09183df2 | 47 | #:use-module (gnu packages xml) |
696cb41b | 48 | #:use-module (srfi srfi-26)) |
e5326da4 DT |
49 | |
50 | (define-public libical | |
51 | (package | |
52 | (name "libical") | |
ab6693c4 | 53 | (version "3.0.5") |
e5326da4 DT |
54 | (source (origin |
55 | (method url-fetch) | |
56 | (uri (string-append | |
57 | "https://github.com/libical/libical/releases/download/v" | |
58 | version "/libical-" version ".tar.gz")) | |
59 | (sha256 | |
60 | (base32 | |
ab6693c4 | 61 | "1rkq9qkvbv76n6k6kc8pxhwj9vhyigkb6flfcn1rk6wwqk451mbs")))) |
e5326da4 DT |
62 | (build-system cmake-build-system) |
63 | (arguments | |
22c161d0 | 64 | '(#:tests? #f ; test suite appears broken |
09183df2 | 65 | #:configure-flags '("-DSHARED_ONLY=true") |
22c161d0 KY |
66 | #:phases |
67 | (modify-phases %standard-phases | |
68 | (add-before 'configure 'patch-paths | |
09183df2 MB |
69 | (lambda* (#:key inputs #:allow-other-keys) |
70 | ;; FIXME: This should be patched to use TZDIR so we can drop | |
71 | ;; the tzdata dependency. | |
72 | (let ((tzdata (assoc-ref inputs "tzdata"))) | |
22c161d0 | 73 | (substitute* "src/libical/icaltz-util.c" |
be81133a LF |
74 | (("\\\"/usr/share/zoneinfo\\\",") |
75 | (string-append "\"" tzdata "/share/zoneinfo\"")) | |
76 | (("\\\"/usr/lib/zoneinfo\\\",") "") | |
77 | (("\\\"/etc/zoneinfo\\\",") "") | |
78 | (("\\\"/usr/share/lib/zoneinfo\\\"") ""))) | |
22c161d0 | 79 | #t))))) |
e5326da4 | 80 | (native-inputs |
ab6693c4 MB |
81 | `(("gtk-doc" ,gtk-doc) |
82 | ("perl" ,perl) | |
09183df2 | 83 | ("pkg-config" ,pkg-config))) |
e5326da4 | 84 | (inputs |
09183df2 MB |
85 | `(("glib" ,glib) |
86 | ("libxml2" ,libxml2) | |
22c161d0 | 87 | ("tzdata" ,tzdata))) |
09183df2 MB |
88 | (propagated-inputs |
89 | ;; In Requires.private of libical.pc. | |
90 | `(("icu4c" ,icu4c))) | |
e5326da4 DT |
91 | (home-page "https://libical.github.io/libical/") |
92 | (synopsis "iCalendar protocols and data formats implementation") | |
93 | (description | |
94 | "Libical is an implementation of the iCalendar protocols and protocol | |
95 | data units.") | |
09183df2 MB |
96 | ;; Can be used with either license. See COPYING. |
97 | (license (list license:lgpl2.1 license:mpl2.0)))) | |
78e6c4a8 LF |
98 | |
99 | (define-public khal | |
100 | (package | |
101 | (name "khal") | |
2125cf62 | 102 | (version "0.10.1") |
78e6c4a8 LF |
103 | (source (origin |
104 | (method url-fetch) | |
105 | (uri (pypi-uri "khal" version)) | |
106 | (sha256 | |
107 | (base32 | |
2125cf62 | 108 | "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l")))) |
78e6c4a8 LF |
109 | (build-system python-build-system) |
110 | (arguments | |
111 | `(#:phases (modify-phases %standard-phases | |
78e6c4a8 LF |
112 | ;; Building the manpage requires khal to be installed. |
113 | (add-after 'install 'manpage | |
32212074 HG |
114 | (lambda* (#:key inputs outputs #:allow-other-keys) |
115 | ;; Make installed package available for running the tests | |
116 | (add-installed-pythonpath inputs outputs) | |
6c738fe9 TGR |
117 | (invoke "make" "--directory=doc/" "man") |
118 | (install-file | |
119 | "doc/build/man/khal.1" | |
120 | (string-append (assoc-ref outputs "out") "/share/man/man1")) | |
121 | #t)) | |
78e6c4a8 LF |
122 | (replace 'check |
123 | (lambda* (#:key inputs #:allow-other-keys) | |
3202d601 | 124 | ;; The tests require us to choose a timezone. |
78e6c4a8 LF |
125 | (setenv "TZ" |
126 | (string-append (assoc-ref inputs "tzdata") | |
127 | "/share/zoneinfo/Zulu")) | |
6e1f91d9 | 128 | (invoke "py.test" "tests")))))) |
78e6c4a8 | 129 | (native-inputs |
928da609 | 130 | `(("python-pytest" ,python-pytest) |
bc8273d0 | 131 | ("python-pytest-cov" ,python-pytest-cov) |
78e6c4a8 LF |
132 | ("python-setuptools-scm" ,python-setuptools-scm) |
133 | ;; Required for tests | |
bc8273d0 | 134 | ("python-freezegun" ,python-freezegun) |
6e1f91d9 | 135 | ("tzdata" ,tzdata-for-tests) |
46f3c8f2 | 136 | ("vdirsyncer" ,vdirsyncer) |
78e6c4a8 LF |
137 | ;; Required to build manpage |
138 | ("python-sphinxcontrib-newsfeed" ,python-sphinxcontrib-newsfeed) | |
139 | ("python-sphinx" ,python-sphinx))) | |
140 | (inputs | |
141 | `(("sqlite" ,sqlite))) | |
142 | (propagated-inputs | |
143 | `(("python-configobj" ,python-configobj) | |
22d7360b | 144 | ("python-dateutil" ,python-dateutil) |
78e6c4a8 LF |
145 | ("python-icalendar" ,python-icalendar) |
146 | ("python-tzlocal" ,python-tzlocal) | |
147 | ("python-urwid" ,python-urwid) | |
46f3c8f2 | 148 | ("python-pyxdg" ,python-pyxdg))) |
78e6c4a8 LF |
149 | (synopsis "Console calendar program") |
150 | (description "Khal is a standards based console calendar program, | |
151 | able to synchronize with CalDAV servers through vdirsyncer.") | |
5309c3a1 | 152 | (home-page "https://lostpackets.de/khal/") |
1eaba63f | 153 | (license license:expat))) |
696cb41b SR |
154 | |
155 | (define-public remind | |
156 | (package | |
157 | (name "remind") | |
88888cd0 | 158 | (version "3.1.16") |
696cb41b SR |
159 | (source |
160 | (origin | |
161 | (method url-fetch) | |
88888cd0 | 162 | (uri (string-append "https://dianne.skoll.ca/projects/remind/download/" |
696cb41b SR |
163 | "remind-" |
164 | (string-join (map (cut string-pad <> 2 #\0) | |
165 | (string-split version #\.)) | |
166 | ".") | |
167 | ".tar.gz")) | |
168 | (sha256 | |
88888cd0 | 169 | (base32 "14yavwqmimba8rdpwx3wlav9sfb0v5rcd1iyzqrs08wx07a9pdzf")))) |
696cb41b SR |
170 | (build-system gnu-build-system) |
171 | (arguments | |
88888cd0 TGR |
172 | '(#:tests? #f)) ; no "check" target |
173 | (home-page "https://dianne.skoll.ca/projects/remind/") | |
696cb41b SR |
174 | (synopsis "Sophisticated calendar and alarm program") |
175 | (description | |
176 | "Remind allows you to remind yourself of upcoming events and appointments. | |
177 | Each reminder or alarm can consist of a message sent to standard output, or a | |
178 | program to be executed. It also features: sophisticated date calculation, | |
179 | moon phases, sunrise/sunset, Hebrew calendar, alarms, PostScript output and | |
180 | proper handling of holidays.") | |
1eaba63f | 181 | (license license:gpl2))) |
585b72c6 EF |
182 | |
183 | (define-public libhdate | |
184 | (package | |
185 | (name "libhdate") | |
186 | (version "1.6.02") | |
187 | (source | |
188 | (origin | |
189 | (method url-fetch) | |
190 | (uri (string-append "mirror://sourceforge/libhdate/libhdate/libhdate-" | |
191 | version "/" name "-" version ".tar.bz2")) | |
192 | (sha256 | |
193 | (base32 | |
194 | "0qkpq412p78znw8gckwcx3l0wcss9s0dgw1pvjb1ih2pxf6hm4rw")))) | |
195 | (build-system gnu-build-system) | |
196 | (home-page "http://libhdate.sourceforge.net/") | |
197 | (synopsis "Library to use Hebrew dates") | |
198 | (description "LibHdate is a small library for the Hebrew calendar and times | |
199 | of day, written in C, and including bindings for C++, pascal, perl, php, python, | |
200 | and ruby. It includes two illustrative command-line programs, @code{hcal} and | |
201 | @code{hdate}, and some snippets and scripts written in the binding languages.") | |
1eaba63f | 202 | (license license:gpl3+))) |