| 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 | ;;; |
| 5 | ;;; This file is part of GNU Guix. |
| 6 | ;;; |
| 7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 8 | ;;; under the terms of the GNU General Public License as published by |
| 9 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 10 | ;;; your option) any later version. |
| 11 | ;;; |
| 12 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | ;;; GNU General Public License for more details. |
| 16 | ;;; |
| 17 | ;;; You should have received a copy of the GNU General Public License |
| 18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 19 | |
| 20 | (define-module (gnu packages dav) |
| 21 | #:use-module (guix build-system python) |
| 22 | #:use-module (guix download) |
| 23 | #:use-module (guix licenses) |
| 24 | #:use-module (guix packages) |
| 25 | #:use-module (gnu packages) |
| 26 | #:use-module (gnu packages check) |
| 27 | #:use-module (gnu packages python) |
| 28 | #:use-module (gnu packages python-web) |
| 29 | #:use-module (gnu packages python-xyz) |
| 30 | #:use-module (gnu packages sphinx)) |
| 31 | |
| 32 | (define-public radicale |
| 33 | (package |
| 34 | (name "radicale") |
| 35 | (version "1.1.6") |
| 36 | (source (origin |
| 37 | (method url-fetch) |
| 38 | (uri (pypi-uri "Radicale" version)) |
| 39 | (sha256 |
| 40 | (base32 |
| 41 | "0ay90nj6fmr2aq8imi0mbjl4m2rzq7a83ikj8qs9gxsylj71j1y0")))) |
| 42 | (build-system python-build-system) |
| 43 | (arguments |
| 44 | '(#:tests? #f)) ; The tests are not distributed in the PyPi release. |
| 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.16.7") |
| 64 | (source (origin |
| 65 | (method url-fetch) |
| 66 | (uri (pypi-uri name version)) |
| 67 | (sha256 |
| 68 | (base32 |
| 69 | "1vqjhn2bffy2bx45a1r14crsyn2cylf5by567g44c4mhpjwwz6vc")))) |
| 70 | (build-system python-build-system) |
| 71 | (arguments |
| 72 | `(#:tests? #f ; The test suite is very flakey. |
| 73 | #:phases (modify-phases %standard-phases |
| 74 | (replace 'check |
| 75 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) |
| 76 | (add-installed-pythonpath inputs outputs) |
| 77 | (setenv "DETERMINISTIC_TESTS" "true") |
| 78 | (setenv "DAV_SERVER" "radicale") |
| 79 | (setenv "REMOTESTORAGE_SERVER" "skip") |
| 80 | (if tests? |
| 81 | (invoke "make" "test") |
| 82 | #t))) |
| 83 | (add-after 'install 'manpage |
| 84 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 85 | (invoke "make" "--directory=docs/" "man") |
| 86 | (install-file |
| 87 | "docs/_build/man/vdirsyncer.1" |
| 88 | (string-append |
| 89 | (assoc-ref outputs "out") |
| 90 | "/share/man/man1")) |
| 91 | #t))))) |
| 92 | (native-inputs |
| 93 | `(("python-setuptools-scm" ,python-setuptools-scm) |
| 94 | ("python-sphinx" ,python-sphinx) |
| 95 | ;; Required for testing |
| 96 | ("python-hypothesis" ,python-hypothesis) |
| 97 | ("python-pytest" ,python-pytest) |
| 98 | ("python-pytest-localserver" ,python-pytest-localserver) |
| 99 | ("python-pytest-subtesthack" ,python-pytest-subtesthack) |
| 100 | ("python-urllib3" ,python-urllib3) |
| 101 | ("python-wsgi-intercept" ,python-wsgi-intercept) |
| 102 | ("radicale" ,radicale))) |
| 103 | (propagated-inputs |
| 104 | `(("python-atomicwrites" ,python-atomicwrites) |
| 105 | ("python-click" ,python-click) |
| 106 | ("python-click-log" ,python-click-log) |
| 107 | ("python-click-threading" ,python-click-threading) |
| 108 | ("python-requests-toolbelt" ,python-requests-toolbelt))) |
| 109 | (synopsis "Synchronize calendars and contacts") |
| 110 | (description "Vdirsyncer synchronizes your calendars and addressbooks |
| 111 | between two storage locations. The most popular purpose is to |
| 112 | synchronize a CalDAV or CardDAV server with a local folder or file. The |
| 113 | local data can then be accessed via a variety of programs, none of which |
| 114 | have to know or worry about syncing to a server.") |
| 115 | (home-page "https://github.com/pimutils/vdirsyncer") |
| 116 | (license bsd-3))) |