dav.scm 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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. ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
  6. ;;;
  7. ;;; This file is part of GNU Guix.
  8. ;;;
  9. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 3 of the License, or (at
  12. ;;; your option) any later version.
  13. ;;;
  14. ;;; GNU Guix is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;;; GNU General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  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 (guix git-download)
  27. #:use-module (gnu packages)
  28. #:use-module (gnu packages check)
  29. #:use-module (gnu packages python)
  30. #:use-module (gnu packages python-check)
  31. #:use-module (gnu packages python-crypto)
  32. #:use-module (gnu packages python-web)
  33. #:use-module (gnu packages python-xyz)
  34. #:use-module (gnu packages sphinx)
  35. #:use-module (gnu packages time)
  36. #:use-module (gnu packages xml))
  37. (define-public radicale
  38. (package
  39. (name "radicale")
  40. (version "3.0.6")
  41. (source
  42. (origin
  43. ;; There are no tests in the PyPI tarball.
  44. (method git-fetch)
  45. (uri (git-reference
  46. (url "https://github.com/Kozea/Radicale")
  47. (commit version)))
  48. (file-name (git-file-name name version))
  49. (sha256
  50. (base32 "1xlsvrmx6jhi71j6j8z9sli5vwxasivzjyqf8zq8r0l5p7350clf"))))
  51. (build-system python-build-system)
  52. (native-inputs
  53. `(("python-pytest" ,python-pytest)
  54. ("python-pytest-cov" ,python-pytest-cov)
  55. ("python-pytest-flake8" ,python-pytest-flake8)
  56. ("python-pytest-isort" ,python-pytest-isort)
  57. ("python-pytest-runner" ,python-pytest-runner)
  58. ("python-waitress" ,python-waitress)))
  59. (propagated-inputs
  60. `(("python-dateutil" ,python-dateutil)
  61. ("python-defusedxml" ,python-defusedxml)
  62. ("python-passlib" ,python-passlib)
  63. ("python-vobject" ,python-vobject)))
  64. (synopsis "Basic CalDAV and CardDAV server")
  65. (description "Radicale is a CalDAV and CardDAV server for UNIX-like
  66. platforms. Calendars and address books are available for both local and remote
  67. access, possibly limited through authentication policies. They can be viewed
  68. and edited by calendar and contact clients on mobile phones or computers.
  69. Radicale intentionally does not fully comply with the CalDAV and CardDAV RFCs.
  70. Instead, it supports the CalDAV and CardDAV implementations of popular
  71. clients.")
  72. (home-page "https://radicale.org/")
  73. (license gpl3+)))
  74. (define-public xandikos
  75. (package
  76. (name "xandikos")
  77. (version "0.2.3")
  78. (source
  79. (origin
  80. (method url-fetch)
  81. (uri (pypi-uri "xandikos" version))
  82. (sha256
  83. (base32 "13ikmcja9p42azb5ccqj2bw98zybna6zlflj10hqy0kvbib70l94"))))
  84. (build-system python-build-system)
  85. (propagated-inputs
  86. `(("python-aiohttp" ,python-aiohttp)
  87. ("python-defusedxml" ,python-defusedxml)
  88. ("python-dulwich" ,python-dulwich)
  89. ("python-icalendar" ,python-icalendar)
  90. ("python-jinja2" ,python-jinja2)
  91. ("python-multidict" ,python-multidict)))
  92. (home-page "https://www.xandikos.org/")
  93. (synopsis "Lightweight CalDAV/CardDAV server")
  94. (description
  95. "Xandikos is a lightweight yet complete CardDAV/CalDAV server that backs
  96. onto a Git repository.
  97. Features:
  98. @itemize
  99. @item Easy to set up
  100. @item Share calendars (events, todo items, journal entries) via CalDAV and
  101. contacts (vCard) via CardDAV
  102. @item Automatically keep history and back up changes in Git
  103. @item Supports synchronization extensions for CalDAV/CardDAV for quick and
  104. efficient syncing
  105. @item Automatically keep history and back up
  106. @item Works with all tested CalDAV and CardDAV clients
  107. @end itemize")
  108. (license gpl3+)))
  109. (define-public vdirsyncer
  110. (package
  111. (name "vdirsyncer")
  112. ;; When updating, check whether python-click-5 can be removed entirely.
  113. (version "0.16.8")
  114. (source (origin
  115. (method url-fetch)
  116. (uri (pypi-uri name version))
  117. (sha256
  118. (base32
  119. "1i8kp9j99rs8xdhrc1vx749zd9wznlzj0pb3s05xdm71a8pl5nxz"))))
  120. (build-system python-build-system)
  121. (arguments
  122. `(#:tests? #f ; The test suite is very flakey.
  123. #:phases (modify-phases %standard-phases
  124. (replace 'check
  125. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  126. (add-installed-pythonpath inputs outputs)
  127. (setenv "DETERMINISTIC_TESTS" "true")
  128. (setenv "DAV_SERVER" "radicale")
  129. (setenv "REMOTESTORAGE_SERVER" "skip")
  130. (if tests?
  131. (invoke "make" "test")
  132. #t)))
  133. (add-after 'unpack 'patch-version-call
  134. (lambda _
  135. (substitute* "docs/conf.py"
  136. (("^release.*") (string-append "release = '" ,version "'\n")))
  137. #t))
  138. (add-after 'install 'manpage
  139. (lambda* (#:key inputs outputs #:allow-other-keys)
  140. (invoke "make" "--directory=docs/" "man")
  141. (install-file
  142. "docs/_build/man/vdirsyncer.1"
  143. (string-append
  144. (assoc-ref outputs "out")
  145. "/share/man/man1"))
  146. #t)))))
  147. (native-inputs
  148. `(("python-setuptools-scm" ,python-setuptools-scm)
  149. ("python-sphinx" ,python-sphinx)
  150. ;; Required for testing
  151. ("python-hypothesis" ,python-hypothesis)
  152. ("python-pytest" ,python-pytest)
  153. ("python-pytest-localserver" ,python-pytest-localserver)
  154. ("python-pytest-subtesthack" ,python-pytest-subtesthack)
  155. ("python-urllib3" ,python-urllib3)
  156. ("python-wsgi-intercept" ,python-wsgi-intercept)
  157. ("radicale" ,radicale)))
  158. (inputs
  159. `(;; XXX https://github.com/mitsuhiko/click/issues/200
  160. ("python-click" ,python-click-5)))
  161. (propagated-inputs
  162. `(("python-atomicwrites" ,python-atomicwrites)
  163. ("python-click-log" ,python-click-log)
  164. ("python-click-threading" ,python-click-threading)
  165. ("python-requests-toolbelt" ,python-requests-toolbelt)))
  166. (synopsis "Synchronize calendars and contacts")
  167. (description "Vdirsyncer synchronizes your calendars and addressbooks
  168. between two storage locations. The most popular purpose is to
  169. synchronize a CalDAV or CardDAV server with a local folder or file. The
  170. local data can then be accessed via a variety of programs, none of which
  171. have to know or worry about syncing to a server.")
  172. (home-page "https://github.com/pimutils/vdirsyncer")
  173. (license bsd-3)))