summaryrefslogtreecommitdiff
path: root/px/packages/etesync.scm
blob: 29ade546faa9c5ce4f3b3e7a4ae41330ea070303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
;;; Package Repository for GNU Guix
;;; Copyright © 2021-2025 Franz Geffke <m@f-a.nz>

(define-module (px packages etesync)
  #:use-module ((guix licenses)
                #:prefix license:)
  #:use-module (ice-9 match)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix build-system python)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages base)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages databases)
  #:use-module (gnu packages dav)
  #:use-module (gnu packages libffi)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-build)
  #:use-module (gnu packages python-crypto)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages python-check)
  #:use-module (gnu packages time)
  #:use-module (gnu packages xml)
  #:use-module (guix git-download)
  #:use-module (px packages python-xyz))

(define-public python-etebase
  (package
    (name "python-etebase")
    (version "0.31.2")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://github.com/etesync/etebase-py/releases/download/v"
             version
             "/etebase-"
             version
             ;; This fails because releases are only available up to python 3.9
             ;; "-cp" (string-replace-substring (version-major+minor (package-version python)) "." "")
             ;; "-cp" (string-replace-substring (version-major+minor (package-version python)) "." "") "-manylinux2010_"
             "-cp39-cp39-manylinux2010_"
             (match (or (%current-system)
                        (%current-target-system))
               ("x86_64-linux" "x86_64")
               ("i686-linux" "i686")
               ("aarch64-linux" "aarch64"))
             ".whl"))
       (sha256
        (base32 "19gf7zriarcac3l6hx4zw7gl175fxaz457gkl4kkjdfcq6g5pxas"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f
       #:validate-runpath? #f
       #:phases (modify-phases %standard-phases
                  (delete 'unpack)
                  (delete 'configure)
                  (delete 'build)
                  (replace 'install
                    (lambda* (#:key inputs outputs #:allow-other-keys)
                      (let* ((source (assoc-ref %build-inputs "source"))
                             (python (assoc-ref inputs "python"))
                             (out (assoc-ref outputs "out"))
                             (bin (string-append out "/bin/"))
                             (target (string-append %output "/lib/python"
                                                    ,(version-major+minor (package-version
                                                                           python))
                                                    "/site-packages/")))
                        (mkdir-p target)
                        (invoke "unzip" source "-d" target) #t))))))
    (native-inputs `(("coreutils" ,coreutils)
                     ("python" ,python-3)
                     ("unzip" ,unzip)))
    (propagated-inputs `(("python-msgpack" ,python-msgpack)))
    (home-page "https://www.etesync.com/")
    (synopsis "A Python library for Etebase")
    (description
     "This package is implemented in Rust and exposes a Python API for people to use.")
    (license license:bsd-3)))

(define-public python-etesync
  (package
    (name "python-etesync")
    (version "0.12.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://github.com/etesync/pyetesync/archive/v"
                           version ".tar.gz"))
       (sha256
        (base32 "18z7fh8mg3h5zdp4zjshg29p495n03i6hh8nghpc9n79a6a4s8k3"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f))
    (native-inputs `(("python" ,python)
                     ("python-appdirs" ,python-appdirs)
                     ("python-asn1crypto" ,python-asn1crypto)
                     ("python-attrs" ,python-attrs)
                     ("python-certifi" ,python-certifi)
                     ("python-cffi" ,python-cffi)
                     ("python-chardet" ,python-chardet)
                     ("python-idna" ,python-idna)
                     ("python-orderedmultidict" ,python-orderedmultidict)
                     ("python-packaging" ,python-packaging)
                     ("python-py" ,python-py)
                     ("python-pyasn1" ,python-pyasn1)
                     ("python-pycparser" ,python-pycparser)
                     ("python-pyparsing" ,python-pyparsing)
                     ("python-dateutil" ,python-dateutil)
                     ("python-pytz" ,python-pytz)
                     ("python-six" ,python-six)
                     ("python-urllib3" ,python-urllib3)))
    (propagated-inputs `(("python-cryptography" ,python-cryptography)
                         ("python-furl" ,python-furl)
                         ("python-peewee" ,python-peewee)
                         ("python-requests" ,python-requests)
                         ("python-vobject" ,python-vobject)))
    (home-page "https://github.com/etesync/pyetesync")
    (synopsis "A python client library for EteSync.")
    (description
     "This module provides a python API to interact with an EteSync server. 
It currently implements AddressBook and Calendar access, and supports two-way sync (both push and pull) to the server.")
    (license license:gpl3)))

;; etesync-dav: Requirement.parse('Radicale==3.0.3'), {'etesync-dav'})
(define-public radicale-3.0.3
  (package
    (name "radicale")
    (version "3.0.3")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "Radicale" version))
       (sha256
        (base32 "08m2lg4z0gr5n8qj54sblld5pqwcqccx1whw2mi74zx4zanrb69x"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f)) ;The tests are not distributed in the PyPi release.
    (native-inputs `(("python-dateutil" ,python-dateutil)
                     ("python-defusedxml" ,python-defusedxml)
                     ("python-passlib" ,python-passlib)
                     ("python-vobject" ,python-vobject)))
    (propagated-inputs
     ;; TODO: Add python-pam
     `(("python-requests" ,python-requests)))
    (synopsis "Basic CalDAV and CardDAV server")
    (description
     "Radicale is a CalDAV and CardDAV server for UNIX-like
platforms.  Calendars and address books are available for both local and remote
access, possibly limited through authentication policies.  They can be viewed
and edited by calendar and contact clients on mobile phones or computers.

Radicale intentionally does not fully comply with the CalDAV and CardDAV RFCs.
Instead, it supports the CalDAV and CardDAV implementations of popular
clients.")
    (home-page "https://radicale.org/")
    (license license:gpl3+)))

(define-public etesync-dav
  (package
    (name "etesync-dav")
    (version "0.32.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri name version))
       (sha256
        (base32 "086pjji6897y157idlnls87qi2f2bq0787lwqfdd4m97jf1yxqm4"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f)) ;The tests are not distributed in the PyPi release.
    (propagated-inputs `(("python-appdirs" ,python-appdirs)
                         ("python-asn1crypto" ,python-asn1crypto)
                         ("python-certifi" ,python-certifi)
                         ("python-cffi" ,python-cffi)
                         ("python-chardet" ,python-chardet)
                         ("python-click" ,python-click)
                         ("python-cryptography" ,python-cryptography)
                         ("python-defusedxml" ,python-defusedxml)
                         ("python-etebase" ,python-etebase)
                         ("python-etesync" ,python-etesync)
                         ("python-exitstatus" ,python-exitstatus)
                         ("python-flask" ,python-flask)
                         ("python-furl" ,python-furl)
                         ("python-idna" ,python-idna)
                         ("python-itsdangerous" ,python-itsdangerous)
                         ("python-flask-wtf" ,python-flask-wtf-0.15.1)
                         ("python-jinja2" ,python-jinja2)
                         ("python-markupsafe" ,python-markupsafe)
                         ("python-msgpack" ,python-msgpack)
                         ("python-orderedmultidict" ,python-orderedmultidict)
                         ("python-packaging" ,python-packaging)
                         ("python-passlib" ,python-passlib)
                         ("python-peewee" ,python-peewee)
                         ("python-py" ,python-py)
                         ("python-pyasn1" ,python-pyasn1)
                         ("python-pycparser" ,python-pycparser)
                         ("python-pyparsing" ,python-pyparsing)
                         ("python-dateutil" ,python-dateutil)
                         ("python-pysocks" ,python-pysocks)
                         ("python-pytz" ,python-pytz)
                         ("python-requests" ,python-requests)
                         ("python-six" ,python-six)
                         ("python-urllib3" ,python-urllib3)
                         ("python-vobject" ,python-vobject)
                         ("python-werkzeug" ,python-werkzeug)
                         ("python-wtforms" ,python-wtforms)
                         ("radicale" ,radicale-3.0.3)))
    (home-page "https://github.com/etesync/etesync-dav")
    (synopsis "CalDAV and CardDAV adapter for EteSync")
    (description
     "This package provides a local CalDAV and CardDAV server that acts as an EteSync compatibility layer (adapter). 
              It's meant for letting desktop CalDAV and CardDAV clients such as Thunderbird, Outlook and Apple Contacts connect with EteSync.")
    (license license:gpl3)))