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