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