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> |
21f05134 | 4 | ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org> |
2b193389 | 5 | ;;; Copyright © 2016 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) | |
34 | #:use-module (gnu packages databases) | |
35 | #:use-module (gnu packages dav) | |
36 | #:use-module (gnu packages freedesktop) | |
e5326da4 | 37 | #:use-module (gnu packages icu4c) |
78e6c4a8 | 38 | #:use-module (gnu packages perl) |
696cb41b SR |
39 | #:use-module (gnu packages python) |
40 | #:use-module (srfi srfi-26)) | |
e5326da4 DT |
41 | |
42 | (define-public libical | |
43 | (package | |
44 | (name "libical") | |
2b193389 | 45 | (version "2.0.0") |
e5326da4 DT |
46 | (source (origin |
47 | (method url-fetch) | |
48 | (uri (string-append | |
49 | "https://github.com/libical/libical/releases/download/v" | |
50 | version "/libical-" version ".tar.gz")) | |
51 | (sha256 | |
52 | (base32 | |
2b193389 | 53 | "1njn2kr0rrjqv5g3hdhpdzrhankyj4fl1bgn76z3g4n1b7vi2k35")))) |
e5326da4 DT |
54 | (build-system cmake-build-system) |
55 | (arguments | |
22c161d0 | 56 | '(#:tests? #f ; test suite appears broken |
2b193389 EF |
57 | #:configure-flags |
58 | (list (string-append "-DCMAKE_INSTALL_RPATH=" | |
59 | (assoc-ref %outputs "out") "/lib:" | |
60 | (assoc-ref %outputs "out") "/lib64")) | |
22c161d0 KY |
61 | #:phases |
62 | (modify-phases %standard-phases | |
63 | (add-before 'configure 'patch-paths | |
64 | (lambda _ | |
65 | (let ((tzdata (assoc-ref %build-inputs "tzdata"))) | |
66 | (substitute* "src/libical/icaltz-util.c" | |
be81133a LF |
67 | (("\\\"/usr/share/zoneinfo\\\",") |
68 | (string-append "\"" tzdata "/share/zoneinfo\"")) | |
69 | (("\\\"/usr/lib/zoneinfo\\\",") "") | |
70 | (("\\\"/etc/zoneinfo\\\",") "") | |
71 | (("\\\"/usr/share/lib/zoneinfo\\\"") ""))) | |
22c161d0 | 72 | #t))))) |
e5326da4 DT |
73 | (native-inputs |
74 | `(("perl" ,perl))) | |
75 | (inputs | |
22c161d0 KY |
76 | `(("icu4c" ,icu4c) |
77 | ("tzdata" ,tzdata))) | |
e5326da4 DT |
78 | (home-page "https://libical.github.io/libical/") |
79 | (synopsis "iCalendar protocols and data formats implementation") | |
80 | (description | |
81 | "Libical is an implementation of the iCalendar protocols and protocol | |
82 | data units.") | |
83 | (license lgpl2.1))) | |
78e6c4a8 LF |
84 | |
85 | (define-public khal | |
86 | (package | |
87 | (name "khal") | |
4653341b | 88 | (version "0.9.5") |
78e6c4a8 LF |
89 | (source (origin |
90 | (method url-fetch) | |
91 | (uri (pypi-uri "khal" version)) | |
92 | (sha256 | |
93 | (base32 | |
4653341b | 94 | "0fvv0kjym9q8v20zbpr5m8ig65b8hva4p0c935qsdvgdni68jidr")))) |
78e6c4a8 LF |
95 | (build-system python-build-system) |
96 | (arguments | |
97 | `(#:phases (modify-phases %standard-phases | |
78e6c4a8 LF |
98 | ;; Building the manpage requires khal to be installed. |
99 | (add-after 'install 'manpage | |
32212074 HG |
100 | (lambda* (#:key inputs outputs #:allow-other-keys) |
101 | ;; Make installed package available for running the tests | |
102 | (add-installed-pythonpath inputs outputs) | |
78e6c4a8 LF |
103 | (zero? (system* "make" "--directory=doc/" "man")) |
104 | (install-file | |
105 | "doc/build/man/khal.1" | |
106 | (string-append (assoc-ref outputs "out") "/share/man/man1")))) | |
b7fbf297 | 107 | |
78e6c4a8 LF |
108 | ;; The tests require us to choose a timezone. |
109 | (replace 'check | |
110 | (lambda* (#:key inputs #:allow-other-keys) | |
111 | (setenv "TZ" | |
112 | (string-append (assoc-ref inputs "tzdata") | |
113 | "/share/zoneinfo/Zulu")) | |
114 | (zero? (system* "py.test" "tests"))))))) | |
115 | (native-inputs | |
3391e2a0 | 116 | ;; XXX Uses tmpdir_factory, introduced in pytest 2.8. |
23b9168d | 117 | `(("python-pytest" ,python-pytest-3.0) |
bc8273d0 | 118 | ("python-pytest-cov" ,python-pytest-cov) |
78e6c4a8 LF |
119 | ("python-setuptools-scm" ,python-setuptools-scm) |
120 | ;; Required for tests | |
121 | ("tzdata" ,tzdata) | |
bc8273d0 | 122 | ("python-freezegun" ,python-freezegun) |
78e6c4a8 LF |
123 | ;; Required to build manpage |
124 | ("python-sphinxcontrib-newsfeed" ,python-sphinxcontrib-newsfeed) | |
125 | ("python-sphinx" ,python-sphinx))) | |
126 | (inputs | |
127 | `(("sqlite" ,sqlite))) | |
128 | (propagated-inputs | |
129 | `(("python-configobj" ,python-configobj) | |
22d7360b | 130 | ("python-dateutil" ,python-dateutil) |
78e6c4a8 LF |
131 | ("python-icalendar" ,python-icalendar) |
132 | ("python-tzlocal" ,python-tzlocal) | |
133 | ("python-urwid" ,python-urwid) | |
134 | ("python-pyxdg" ,python-pyxdg) | |
135 | ("vdirsyncer" ,vdirsyncer))) | |
136 | (synopsis "Console calendar program") | |
137 | (description "Khal is a standards based console calendar program, | |
138 | able to synchronize with CalDAV servers through vdirsyncer.") | |
139 | (home-page "http://lostpackets.de/khal/") | |
140 | (license expat))) | |
696cb41b SR |
141 | |
142 | (define-public remind | |
143 | (package | |
144 | (name "remind") | |
145 | (version "3.1.15") | |
146 | (source | |
147 | (origin | |
148 | (method url-fetch) | |
149 | (uri (string-append "https://www.roaringpenguin.com/files/download/" | |
150 | "remind-" | |
151 | (string-join (map (cut string-pad <> 2 #\0) | |
152 | (string-split version #\.)) | |
153 | ".") | |
154 | ".tar.gz")) | |
155 | (sha256 | |
156 | (base32 | |
157 | "1hcfcxz5fjzl7606prlb7dgls5kr8z3wb51h48s6qm8ang0b9nla")))) | |
158 | (build-system gnu-build-system) | |
159 | (arguments | |
160 | '(#:tests? #f)) ;no "check" target | |
161 | (home-page "http://www.roaringpenguin.com/products/remind/") | |
162 | (synopsis "Sophisticated calendar and alarm program") | |
163 | (description | |
164 | "Remind allows you to remind yourself of upcoming events and appointments. | |
165 | Each reminder or alarm can consist of a message sent to standard output, or a | |
166 | program to be executed. It also features: sophisticated date calculation, | |
167 | moon phases, sunrise/sunset, Hebrew calendar, alarms, PostScript output and | |
168 | proper handling of holidays.") | |
169 | (license gpl2))) | |
585b72c6 EF |
170 | |
171 | (define-public libhdate | |
172 | (package | |
173 | (name "libhdate") | |
174 | (version "1.6.02") | |
175 | (source | |
176 | (origin | |
177 | (method url-fetch) | |
178 | (uri (string-append "mirror://sourceforge/libhdate/libhdate/libhdate-" | |
179 | version "/" name "-" version ".tar.bz2")) | |
180 | (sha256 | |
181 | (base32 | |
182 | "0qkpq412p78znw8gckwcx3l0wcss9s0dgw1pvjb1ih2pxf6hm4rw")))) | |
183 | (build-system gnu-build-system) | |
184 | (home-page "http://libhdate.sourceforge.net/") | |
185 | (synopsis "Library to use Hebrew dates") | |
186 | (description "LibHdate is a small library for the Hebrew calendar and times | |
187 | of day, written in C, and including bindings for C++, pascal, perl, php, python, | |
188 | and ruby. It includes two illustrative command-line programs, @code{hcal} and | |
189 | @code{hdate}, and some snippets and scripts written in the binding languages.") | |
190 | (license gpl3+))) |