gnu: vdirsyncer: Update 0.9.2.
[jackhill/guix/guix.git] / gnu / packages / dav.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages dav)
20 #:use-module (guix build-system python)
21 #:use-module (guix download)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (gnu packages python))
25
26 (define-public radicale
27 (package
28 (name "radicale")
29 (version "1.1.1")
30 (source (origin
31 (method url-fetch)
32 (uri (pypi-uri "Radicale" version))
33 (sha256
34 (base32
35 "1c5lv8qca21mndkx350wxv34qypqh6gb4rhzms4anr642clq3jg2"))))
36 (build-system python-build-system)
37 (propagated-inputs
38 ;; TODO: Add python-pam
39 `(("python-requests" ,python-requests)))
40 (synopsis "Basic CalDAV and CardDAV server")
41 (description "Radicale is a CalDAV and CardDAV server for UNIX-like
42 platforms. Calendars and address books are available for both local and remote
43 access, possibly limited through authentication policies. They can be viewed
44 and edited by calendar and contact clients on mobile phones or computers.
45
46 Radicale intentionally does not fully comply with the CalDAV and CardDAV RFCs.
47 Instead, it supports the CalDAV and CardDAV implementations of popular
48 clients.")
49 (home-page "http://radicale.org/")
50 (license gpl3+)))
51
52 (define-public vdirsyncer
53 (package
54 (name "vdirsyncer")
55 (version "0.9.2")
56 (source (origin
57 (method url-fetch)
58 (uri (pypi-uri "vdirsyncer" version))
59 (sha256
60 (base32
61 "1g1107cz4sk41d2z6k6pn9n2fzd26m72j8aj33zn483vfvmyrc4q"))))
62 (build-system python-build-system)
63 (arguments
64 `(#:phases (modify-phases %standard-phases
65 ;; vdirsyncer requires itself to be installed in order to build
66 ;; the manpage.
67 (add-after 'install 'manpage
68 (lambda* (#:key outputs #:allow-other-keys)
69 (setenv "PYTHONPATH"
70 (string-append
71 (getenv "PYTHONPATH")
72 ":" (assoc-ref outputs "out")))
73 (zero? (system* "make" "--directory=docs/" "man"))
74 (install-file
75 "docs/_build/man/vdirsyncer.1"
76 (string-append
77 (assoc-ref outputs "out")
78 "/share/man/man1"))))
79 ;; vdirsyncer requires itself to be installed in order to run the test
80 ;; suite.
81 (delete 'check)
82 (add-after 'install 'check-later
83 (lambda _
84 (setenv "DETERMINISTIC_TESTS" "true")
85 (setenv "DAV_SERVER" "radicale")
86 (setenv "REMOTESTORAGE_SERVER" "skip")
87 (zero? (system* "make" "test")))))))
88 (native-inputs
89 `(("python-setuptools-scm" ,python-setuptools-scm)
90 ("python-sphinx" ,python-sphinx)
91 ;; Required for testing
92 ("python-hypothesis" ,python-hypothesis)
93 ("python-pytest" ,python-pytest)
94 ("python-pytest-localserver" ,python-pytest-localserver)
95 ("python-pytest-subtesthack" ,python-pytest-subtesthack)
96 ("python-wsgi-intercept" ,python-wsgi-intercept)
97 ("radicale" ,radicale)))
98 (propagated-inputs
99 `(("python-atomicwrites" ,python-atomicwrites)
100 ("python-click" ,python-click)
101 ("python-click-log" ,python-click-log)
102 ("python-click-threading" ,python-click-threading)
103 ("python-lxml" ,python-lxml)
104 ("python-requests-toolbelt" ,python-requests-toolbelt)))
105 (synopsis "Synchronize calendars and contacts")
106 (description "Vdirsyncer synchronizes your calendars and addressbooks
107 between two storage locations. The most popular purpose is to
108 synchronize a CalDAV or CardDAV server with a local folder or file. The
109 local data can then be accessed via a variety of programs, none of which
110 have to know or worry about syncing to a server.")
111 (home-page "https://github.com/untitaker/vdirsyncer")
112 (license expat)))