Merge branch 'master' into core-updates
[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 (arguments
38 `(#:phases
39 (modify-phases %standard-phases
40 (replace 'check
41 (lambda _
42 (zero? (system* "py.test")))))))
43 (native-inputs
44 `(("python-pytest" ,python-pytest)))
45 (propagated-inputs
46 ;; TODO: Add python-pam
47 `(("python-requests" ,python-requests)))
48 (synopsis "Basic CalDAV and CardDAV server")
49 (description "Radicale is a CalDAV and CardDAV server for UNIX-like
50 platforms. Calendars and address books are available for both local and remote
51 access, possibly limited through authentication policies. They can be viewed
52 and edited by calendar and contact clients on mobile phones or computers.
53
54 Radicale intentionally does not fully comply with the CalDAV and CardDAV RFCs.
55 Instead, it supports the CalDAV and CardDAV implementations of popular
56 clients.")
57 (home-page "http://radicale.org/")
58 (license gpl3+)))
59
60 (define-public vdirsyncer
61 (package
62 (name "vdirsyncer")
63 (version "0.13.1")
64 (source (origin
65 (method url-fetch)
66 (uri (pypi-uri name version))
67 (sha256
68 (base32
69 "1c4kipcc7dx1rn5j1a1x7wckz09mm9ihwakf3ramwn1y78q5zanb"))))
70 (build-system python-build-system)
71 (arguments
72 `(#:phases (modify-phases %standard-phases
73 ;; vdirsyncer requires itself to be installed in order to build
74 ;; the manpage.
75 (add-after 'install 'manpage
76 (lambda* (#:key outputs #:allow-other-keys)
77 (setenv "PYTHONPATH"
78 (string-append
79 (getenv "PYTHONPATH")
80 ":" (assoc-ref outputs "out")))
81 (zero? (system* "make" "--directory=docs/" "man"))
82 (install-file
83 "docs/_build/man/vdirsyncer.1"
84 (string-append
85 (assoc-ref outputs "out")
86 "/share/man/man1"))))
87 ;; vdirsyncer requires itself to be installed in order to run the test
88 ;; suite.
89 (delete 'check)
90 (add-after 'install 'check-later
91 (lambda _
92 (setenv "DETERMINISTIC_TESTS" "true")
93 (setenv "DAV_SERVER" "radicale")
94 (setenv "REMOTESTORAGE_SERVER" "skip")
95 (zero? (system* "make" "test")))))))
96 (native-inputs
97 `(("python-setuptools-scm" ,python-setuptools-scm)
98 ("python-sphinx" ,python-sphinx)
99 ;; Required for testing
100 ("python-hypothesis" ,python-hypothesis)
101 ("python-pytest" ,python-pytest)
102 ("python-pytest-localserver" ,python-pytest-localserver)
103 ("python-pytest-subtesthack" ,python-pytest-subtesthack)
104 ("python-wsgi-intercept" ,python-wsgi-intercept)
105 ("radicale" ,radicale)))
106 (propagated-inputs
107 `(("python-atomicwrites" ,python-atomicwrites)
108 ("python-click" ,python-click)
109 ("python-click-log" ,python-click-log)
110 ("python-click-threading" ,python-click-threading)
111 ("python-requests-toolbelt" ,python-requests-toolbelt)))
112 (synopsis "Synchronize calendars and contacts")
113 (description "Vdirsyncer synchronizes your calendars and addressbooks
114 between two storage locations. The most popular purpose is to
115 synchronize a CalDAV or CardDAV server with a local folder or file. The
116 local data can then be accessed via a variety of programs, none of which
117 have to know or worry about syncing to a server.")
118 (home-page "https://github.com/untitaker/vdirsyncer")
119 (license expat)))