gnu: deutex: Update to 5.2.1.
[jackhill/guix/guix.git] / gnu / packages / sync.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
7 ;;; Copyright © 2019 Clément Lassieur <clement@lassieur.org>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages sync)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix build-system cmake)
27 #:use-module (guix build-system go)
28 #:use-module (guix build-system meson)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix packages)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages acl)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages golang)
38 #:use-module (gnu packages linux)
39 #:use-module (gnu packages lua)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages qt)
43 #:use-module (gnu packages rsync)
44 #:use-module (gnu packages selinux)
45 #:use-module (gnu packages sphinx)
46 #:use-module (gnu packages sqlite)
47 #:use-module (gnu packages tls))
48
49 (define-public owncloud-client
50 (package
51 (name "owncloud-client")
52 (version "2.5.3.11470")
53 (source
54 (origin
55 (method url-fetch)
56 (uri (string-append "https://download.owncloud.com/desktop/stable/"
57 "owncloudclient-" version ".tar.xz"))
58 (sha256
59 (base32 "0cznis8qadsnlgm046lxn8vmbxli6zp4b8nk93n53mkfxlcw355n"))
60 (patches (search-patches "owncloud-disable-updatecheck.patch"))
61 (modules '((guix build utils)))
62 (snippet
63 '(begin
64 ;; libcrashreporter-qt has its own bundled dependencies
65 (delete-file-recursively "src/3rdparty/libcrashreporter-qt")
66 (delete-file-recursively "src/3rdparty/sqlite3")
67 ;; qprogessindicator, qlockedfile, qtokenizer and
68 ;; qtsingleapplication have not yet been packaged, but all are
69 ;; explicitly used from the 3rdparty folder during build.
70 ;; We can also remove the macgoodies folder
71 (delete-file-recursively "src/3rdparty/qtmacgoodies")
72 #t))))
73 (build-system cmake-build-system)
74 (arguments
75 `(#:phases
76 (modify-phases %standard-phases
77 (add-after 'unpack 'delete-failing-tests
78 ;; "Could not create autostart folder"
79 (lambda _
80 (substitute* "test/CMakeLists.txt"
81 (("owncloud_add_test\\(Utility \"\"\\)" test)
82 (string-append "#" test)))
83 #t))
84 (add-after 'unpack 'dont-embed-store-path
85 (lambda _
86 (substitute* "src/common/utility_unix.cpp"
87 (("QCoreApplication::applicationFilePath\\()") "\"owncloud\""))
88 #t))
89 (delete 'patch-dot-desktop-files))
90 #:configure-flags '("-DUNIT_TESTING=ON"
91 ;; build without qtwebkit, which causes the
92 ;; package to FTBFS while looking for QWebView.
93 "-DNO_SHIBBOLETH=1")))
94 (native-inputs
95 `(("cmocka" ,cmocka)
96 ("perl" ,perl)
97 ("pkg-config" ,pkg-config)
98 ("qtlinguist" ,qttools)))
99 (inputs
100 `(("qtbase" ,qtbase)
101 ("qtkeychain" ,qtkeychain)
102 ("sqlite" ,sqlite)
103 ("zlib" ,zlib)))
104 (home-page "https://owncloud.org")
105 (synopsis "Folder synchronization with an ownCloud server")
106 (description "The ownCloudSync system lets you always have your latest
107 files wherever you are. Just specify one or more folders on the local machine
108 to and a server to synchronize to. You can configure more computers to
109 synchronize to the same server and any change to the files on one computer will
110 silently and reliably flow across to every other.")
111 (license license:gpl2+)))
112
113 (define-public qsyncthingtray
114 (package
115 (name "qsyncthingtray")
116 (version "0.5.8")
117 (source
118 (origin
119 (method git-fetch)
120 (uri (git-reference
121 (url "https://github.com/sieren/QSyncthingTray")
122 (commit version)))
123 (file-name (git-file-name name version))
124 (sha256
125 (base32
126 "1n9g4j7qznvg9zl6x163pi9f7wsc3x6q76i33psnm7x2v1i22x5w"))))
127 (build-system cmake-build-system)
128 (arguments
129 `(#:configure-flags '("-DQST_BUILD_WEBKIT=1")
130 #:phases
131 (modify-phases %standard-phases
132 ;; The program is meant to be run from the git repo or source tarball.
133 (replace 'install
134 (lambda* (#:key outputs #:allow-other-keys)
135 (let* ((out (assoc-ref outputs "out"))
136 (bin (string-append out "/bin")))
137 (install-file "QSyncthingTray" bin)
138 (mkdir-p (string-append out "/share/pixmaps"))
139 (copy-file "../source/resources/images/Icon1024.png"
140 (string-append
141 out "/share/pixmaps/QSyncthingTray.png"))
142 #t))))
143 #:tests? #f)) ; no test target
144 (inputs
145 `(("qtbase" ,qtbase)
146 ("qtwebkit" ,qtwebkit)))
147 (home-page "https://github.com/sieren/QSyncthingTray")
148 (synopsis "Traybar Application for Syncthing")
149 (description
150 "A traybar application for syncthing.
151 @enumerate
152 @item Shows number of connections at a glance.
153 @item Traffic statistics about incoming, outgoing and total throughput.
154 @item Launches Syncthing and Syncthing-iNotifier if specified.
155 @item Quickly pause Syncthing with one click.
156 @item Last Synced Files - Quickly see the recently synchronised files and open
157 their folder.
158 @item Quick Access to all shared folders.
159 @item Presents Syncthing UI in a separate view instead of using the browser.
160 @item Supports authenticated HTTPS connections.
161 @item Uses System Notifications about current connection status.
162 @item Toggle for monochrome icon.
163 @end enumerate\n")
164 (license license:lgpl3+)))
165
166 (define-public lsyncd
167 (package
168 (name "lsyncd")
169 (version "2.2.2")
170 (source
171 (origin
172 (method git-fetch)
173 (uri (git-reference
174 (url "https://github.com/axkibe/lsyncd.git")
175 (commit (string-append "release-" version))))
176 (file-name (git-file-name name version))
177 (sha256
178 (base32 "1q2ixp52r96ckghgmxdbms6xrq8dbziimp8gmgzqfq4lk1v1w80y"))))
179 (build-system cmake-build-system)
180 (arguments
181 `(;; The "tests" target is broken and assumes that tests are run in the
182 ;; root directory.
183 #:tests? #f
184 #:test-target "tests"
185 #:phases
186 (modify-phases %standard-phases
187 (add-after 'unpack 'search-$PATH-for-binaries
188 ;; lsyncd requires and hard-codes absolute file names to binaries.
189 ;; Make it fall back to searching $PATH for relative file names.
190 (lambda _
191 (substitute* "lsyncd.c"
192 (("execv\\(") "execvp("))
193 (substitute* (list "lsyncd.lua"
194 "default-direct.lua"
195 "default-rsync.lua"
196 "default-rsyncssh.lua")
197 (("(|/usr)/bin/") ""))
198 #t))
199 (replace 'install
200 ;; No install target.
201 (lambda* (#:key outputs #:allow-other-keys)
202 (let* ((out (assoc-ref outputs "out"))
203 (bin (string-append out "/bin"))
204 (man (string-append out "/share/man/man1")))
205 (install-file "lsyncd" bin)
206 (install-file "../source/doc/manpage/lsyncd.1" man)
207 #t))))))
208 (native-inputs
209 `(("lua" ,lua-5.2)))
210 (home-page "https://github.com/axkibe/lsyncd")
211 (synopsis "Synchronize local directories with remote targets")
212 (description "Lsyncd watches a local directory trees event monitor
213 interface (inotify or fsevents). It aggregates and combines events for a few
214 seconds and then spawns one (or more) process(es) to synchronize the changes.
215 By default this is rsync, which must be installed on all source and target
216 machines. Lsyncd is thus a light-weight live mirror solution that is
217 comparatively easy to install not requiring new file systems or block devices
218 and does not hamper local file system performance.")
219 (license license:gpl2+)))
220
221 (define-public casync
222 (package
223 (name "casync")
224 (version "2")
225 (home-page "https://github.com/systemd/casync/")
226 (source (origin
227 (method git-fetch)
228 (uri (git-reference
229 (url home-page)
230 (commit (string-append "v" version))))
231 (sha256
232 (base32
233 "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88"))
234 (file-name (string-append name "-" version "-checkout"))
235 (patches (search-patches "casync-renameat2-declaration.patch"))))
236 (build-system meson-build-system)
237 (native-inputs
238 `(("pkg-config" ,pkg-config)
239 ("python-sphinx" ,python-sphinx)
240 ("rsync" ,rsync))) ;for tests
241 (inputs
242 `(("xz" ,xz) ;for liblzma
243 ("zstd" ,zstd "lib")
244 ("curl" ,curl)
245 ("acl" ,acl)
246 ("libselinux" ,libselinux)
247 ("fuse" ,fuse)
248 ("openssl" ,openssl)
249 ("zlib" ,zlib)))
250 (synopsis "File synchronization and backup system")
251 (description
252 "casync is a @dfn{content-addressable data synchronizer} that can be used
253 as the basis of a backup system. It is:
254
255 @itemize
256 @item A combination of the rsync algorithm and content-addressable storage;
257 @item An efficient way to store and retrieve multiple related versions of
258 large file systems or directory trees;
259 @item An efficient way to deliver and update OS, VM, IoT and container images
260 over the Internet in an HTTP and CDN friendly way;
261 @item An efficient backup system.
262 @end itemize\n")
263 (license license:lgpl2.1+)))
264
265 (define-public rclone
266 (package
267 (name "rclone")
268 (version "1.50.2")
269 (source
270 (origin
271 (method url-fetch)
272 (uri (string-append "https://github.com/rclone/rclone/releases/download/"
273 "v" version "/rclone-v" version ".tar.gz"))
274 (sha256
275 (base32 "14b0k5nb85v0mxmdpqxf8avha0wwc3f4dbj1s8h3hkaifa59kn3d"))))
276 ;; FIXME: Rclone bundles some libraries Guix already provides. Need to
277 ;; un-bundle them.
278 (build-system go-build-system)
279 (arguments
280 '(#:import-path "github.com/rclone/rclone"
281 #:install-source? #f))
282 (synopsis "@code{rsync} for cloud storage")
283 (description "@code{Rclone} is a command line program to sync files and
284 directories to and from different cloud storage providers.
285
286 Features include:
287 @itemize
288 @item MD5/SHA1 hashes checked at all times for file integrity
289 @item Timestamps preserved on files
290 @item Partial syncs supported on a whole file basis
291 @item Copy mode to just copy new/changed files
292 @item Sync (one way) mode to make a directory identical
293 @item Check mode to check for file hash equality
294 @item Can sync to and from network, e.g., two different cloud accounts
295 @item Optional encryption (Crypt)
296 @item Optional cache (Cache)
297 @item Optional FUSE mount (rclone mount)
298 @end itemize")
299 (home-page "https://rclone.org/")
300 (license license:expat)))