gnu: Separate Python core packages from the rest.
[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>
6c738fe9 8;;; Copyright © 2018 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 databases)
36 #:use-module (gnu packages dav)
37 #:use-module (gnu packages freedesktop)
09183df2 38 #:use-module (gnu packages glib)
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)
33dc54b0 44 #:use-module (gnu packages time)
09183df2 45 #:use-module (gnu packages xml)
696cb41b 46 #:use-module (srfi srfi-26))
e5326da4
DT
47
48(define-public libical
49 (package
50 (name "libical")
525a62e5 51 (version "3.0.4")
e5326da4
DT
52 (source (origin
53 (method url-fetch)
54 (uri (string-append
55 "https://github.com/libical/libical/releases/download/v"
56 version "/libical-" version ".tar.gz"))
57 (sha256
58 (base32
525a62e5 59 "0ifisnh42cw5z53hp9p52l3ggc7k877zlqk0n06gdhrk0bhidckj"))))
e5326da4
DT
60 (build-system cmake-build-system)
61 (arguments
22c161d0 62 '(#:tests? #f ; test suite appears broken
09183df2 63 #:configure-flags '("-DSHARED_ONLY=true")
22c161d0
KY
64 #:phases
65 (modify-phases %standard-phases
66 (add-before 'configure 'patch-paths
09183df2
MB
67 (lambda* (#:key inputs #:allow-other-keys)
68 ;; FIXME: This should be patched to use TZDIR so we can drop
69 ;; the tzdata dependency.
70 (let ((tzdata (assoc-ref inputs "tzdata")))
22c161d0 71 (substitute* "src/libical/icaltz-util.c"
be81133a
LF
72 (("\\\"/usr/share/zoneinfo\\\",")
73 (string-append "\"" tzdata "/share/zoneinfo\""))
74 (("\\\"/usr/lib/zoneinfo\\\",") "")
75 (("\\\"/etc/zoneinfo\\\",") "")
76 (("\\\"/usr/share/lib/zoneinfo\\\"") "")))
22c161d0 77 #t)))))
e5326da4 78 (native-inputs
09183df2
MB
79 `(("perl" ,perl)
80 ("pkg-config" ,pkg-config)))
e5326da4 81 (inputs
09183df2
MB
82 `(("glib" ,glib)
83 ("libxml2" ,libxml2)
22c161d0 84 ("tzdata" ,tzdata)))
09183df2
MB
85 (propagated-inputs
86 ;; In Requires.private of libical.pc.
87 `(("icu4c" ,icu4c)))
e5326da4
DT
88 (home-page "https://libical.github.io/libical/")
89 (synopsis "iCalendar protocols and data formats implementation")
90 (description
91 "Libical is an implementation of the iCalendar protocols and protocol
92data units.")
09183df2
MB
93 ;; Can be used with either license. See COPYING.
94 (license (list license:lgpl2.1 license:mpl2.0))))
78e6c4a8
LF
95
96(define-public khal
97 (package
98 (name "khal")
f1be3735 99 (version "0.9.10")
78e6c4a8
LF
100 (source (origin
101 (method url-fetch)
102 (uri (pypi-uri "khal" version))
103 (sha256
104 (base32
f1be3735 105 "03h0j0d3xyqh98x5v2gv63wv3g91hip3vsaxvybsn5iz331d23h4"))))
78e6c4a8
LF
106 (build-system python-build-system)
107 (arguments
108 `(#:phases (modify-phases %standard-phases
78e6c4a8
LF
109 ;; Building the manpage requires khal to be installed.
110 (add-after 'install 'manpage
32212074
HG
111 (lambda* (#:key inputs outputs #:allow-other-keys)
112 ;; Make installed package available for running the tests
113 (add-installed-pythonpath inputs outputs)
6c738fe9
TGR
114 (invoke "make" "--directory=doc/" "man")
115 (install-file
116 "doc/build/man/khal.1"
117 (string-append (assoc-ref outputs "out") "/share/man/man1"))
118 #t))
78e6c4a8
LF
119 (replace 'check
120 (lambda* (#:key inputs #:allow-other-keys)
3202d601 121 ;; The tests require us to choose a timezone.
78e6c4a8
LF
122 (setenv "TZ"
123 (string-append (assoc-ref inputs "tzdata")
124 "/share/zoneinfo/Zulu"))
6c738fe9
TGR
125 (invoke "py.test" "tests" "-k"
126 (string-append
127 ;; These tests are known to fail in when not
128 ;; running in a TTY:
129 ;; https://github.com/pimutils/khal/issues/683
130 "not test_printics_read_from_stdin "
3a2627b8
LF
131 "and not test_import_from_stdin "
132 ;; https://github.com/pimutils/khal/issues/825
133 "and not test_description_and_location_and_categories")))))))
78e6c4a8 134 (native-inputs
928da609 135 `(("python-pytest" ,python-pytest)
bc8273d0 136 ("python-pytest-cov" ,python-pytest-cov)
78e6c4a8
LF
137 ("python-setuptools-scm" ,python-setuptools-scm)
138 ;; Required for tests
bc8273d0 139 ("python-freezegun" ,python-freezegun)
46f3c8f2
LF
140 ("tzdata" ,tzdata)
141 ("vdirsyncer" ,vdirsyncer)
78e6c4a8
LF
142 ;; Required to build manpage
143 ("python-sphinxcontrib-newsfeed" ,python-sphinxcontrib-newsfeed)
144 ("python-sphinx" ,python-sphinx)))
145 (inputs
146 `(("sqlite" ,sqlite)))
147 (propagated-inputs
148 `(("python-configobj" ,python-configobj)
22d7360b 149 ("python-dateutil" ,python-dateutil)
78e6c4a8
LF
150 ("python-icalendar" ,python-icalendar)
151 ("python-tzlocal" ,python-tzlocal)
152 ("python-urwid" ,python-urwid)
46f3c8f2 153 ("python-pyxdg" ,python-pyxdg)))
78e6c4a8
LF
154 (synopsis "Console calendar program")
155 (description "Khal is a standards based console calendar program,
156able to synchronize with CalDAV servers through vdirsyncer.")
157 (home-page "http://lostpackets.de/khal/")
1eaba63f 158 (license license:expat)))
696cb41b
SR
159
160(define-public remind
161 (package
162 (name "remind")
163 (version "3.1.15")
164 (source
165 (origin
166 (method url-fetch)
167 (uri (string-append "https://www.roaringpenguin.com/files/download/"
168 "remind-"
169 (string-join (map (cut string-pad <> 2 #\0)
170 (string-split version #\.))
171 ".")
172 ".tar.gz"))
173 (sha256
174 (base32
175 "1hcfcxz5fjzl7606prlb7dgls5kr8z3wb51h48s6qm8ang0b9nla"))))
176 (build-system gnu-build-system)
177 (arguments
178 '(#:tests? #f)) ;no "check" target
179 (home-page "http://www.roaringpenguin.com/products/remind/")
180 (synopsis "Sophisticated calendar and alarm program")
181 (description
182 "Remind allows you to remind yourself of upcoming events and appointments.
183Each reminder or alarm can consist of a message sent to standard output, or a
184program to be executed. It also features: sophisticated date calculation,
185moon phases, sunrise/sunset, Hebrew calendar, alarms, PostScript output and
186proper handling of holidays.")
1eaba63f 187 (license license:gpl2)))
585b72c6
EF
188
189(define-public libhdate
190 (package
191 (name "libhdate")
192 (version "1.6.02")
193 (source
194 (origin
195 (method url-fetch)
196 (uri (string-append "mirror://sourceforge/libhdate/libhdate/libhdate-"
197 version "/" name "-" version ".tar.bz2"))
198 (sha256
199 (base32
200 "0qkpq412p78znw8gckwcx3l0wcss9s0dgw1pvjb1ih2pxf6hm4rw"))))
201 (build-system gnu-build-system)
202 (home-page "http://libhdate.sourceforge.net/")
203 (synopsis "Library to use Hebrew dates")
204 (description "LibHdate is a small library for the Hebrew calendar and times
205of day, written in C, and including bindings for C++, pascal, perl, php, python,
206and ruby. It includes two illustrative command-line programs, @code{hcal} and
207@code{hdate}, and some snippets and scripts written in the binding languages.")
1eaba63f 208 (license license:gpl3+)))