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