gnu: r-fields: Update to 11.4.
[jackhill/guix/guix.git] / gnu / packages / sync.scm
CommitLineData
b2e93b9e 1;;; GNU Guix --- Functional package management for GNU
9f170682 2;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
7ee557a7 3;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
36384fd2 4;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
fe84a00f 5;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
ab7011f8 6;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
809b3963 7;;; Copyright © 2019 Clément Lassieur <clement@lassieur.org>
1b029025 8;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
b2e93b9e
EF
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
760d6066 25(define-module (gnu packages sync)
b2e93b9e
EF
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix build-system cmake)
1b029025 28 #:use-module (guix build-system gnu)
47f92fbb 29 #:use-module (guix build-system go)
fe84a00f 30 #:use-module (guix build-system meson)
b2e93b9e 31 #:use-module (guix download)
fe84a00f 32 #:use-module (guix git-download)
b2e93b9e 33 #:use-module (guix packages)
6563d58c 34 #:use-module (gnu packages)
fe84a00f 35 #:use-module (gnu packages acl)
1b029025
JK
36 #:use-module (gnu packages adns)
37 #:use-module (gnu packages autotools)
2523691a 38 #:use-module (gnu packages check)
b2e93b9e 39 #:use-module (gnu packages compression)
1b029025 40 #:use-module (gnu packages crypto)
fe84a00f 41 #:use-module (gnu packages curl)
3e67182f
JK
42 #:use-module (gnu packages documentation)
43 #:use-module (gnu packages glib)
47f92fbb 44 #:use-module (gnu packages golang)
1b029025 45 #:use-module (gnu packages image)
b2e93b9e 46 #:use-module (gnu packages linux)
7ee557a7 47 #:use-module (gnu packages lua)
1b029025 48 #:use-module (gnu packages pcre)
b2e93b9e
EF
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
b2e93b9e 51 #:use-module (gnu packages qt)
1b029025 52 #:use-module (gnu packages readline)
fe84a00f
LC
53 #:use-module (gnu packages rsync)
54 #:use-module (gnu packages selinux)
9d0c291e 55 #:use-module (gnu packages sphinx)
cd0322a3 56 #:use-module (gnu packages sqlite)
b2e93b9e
EF
57 #:use-module (gnu packages tls))
58
1b029025
JK
59(define-public megacmd
60 (package
61 (name "megacmd")
62 (version "1.1.0")
63 (source
64 (origin
65 (method git-fetch)
66 (uri (git-reference
b0e7b699 67 (url "https://github.com/meganz/MEGAcmd")
1b029025
JK
68 (commit (string-append version "_Linux"))
69 (recursive? #t)))
70 (sha256
71 (base32
72 "004j8m3xs6slx03g2g6wzr97myl2v3zc09wxnfar5c62a625pd53"))
73 (file-name (git-file-name name version))))
74 (build-system gnu-build-system)
75 ;; XXX: Disabling tests because they depend on libgtest.la from googletest,
76 ;; which is not installed for unclear reasons.
77 (arguments
78 `(#:tests? #f
79 #:configure-flags '("--with-pcre")))
80 (native-inputs
81 `(("autoconf" ,autoconf)
82 ("automake" ,automake)
83 ("libtool" ,libtool)))
84 (inputs
85 `(("c-ares" ,c-ares)
86 ("crypto++" ,crypto++)
87 ("curl" ,curl)
88 ("freeimage" ,freeimage)
89 ("gtest" ,googletest)
90 ("openssl" ,openssl)
91 ("pcre" ,pcre)
92 ("readline" ,readline)
93 ("sodium" ,libsodium)
94 ("sqlite3" ,sqlite)
95 ("zlib" ,zlib)))
96 (home-page "https://mega.nz/cmd")
97 (synopsis
98 "Command Line Interactive and Scriptable Application to access mega.nz")
99 (description "MEGAcmd provides non UI access to MEGA services. It intends
100to offer all the functionality of a MEGA account via commands. It features
101synchronization, backup of local folders into a MEGA account and a
3e67182f
JK
102webdav/streaming server.
103
104See also: megatools, a third-party alternative more commonly packaged in other
105distributions.")
1b029025
JK
106 (license (list license:bsd-2 license:gpl3+))))
107
3e67182f
JK
108(define-public megatools
109 (package
110 (name "megatools")
9f170682 111 (version "1.10.3")
3e67182f
JK
112 (source
113 (origin
114 (method url-fetch)
115 (uri (string-append "https://megatools.megous.com/builds/megatools-"
116 version ".tar.gz"))
117 (sha256
118 (base32
9f170682 119 "1nwbalc54iz6616liyxfalf5yafwx0iv6cmqgvg4kz9khqscmhcd"))))
3e67182f 120 (build-system gnu-build-system)
773ba8ae
EF
121 (arguments
122 '(#:phases
123 (modify-phases %standard-phases
124 (add-after 'install 'install-completions
125 (lambda* (#:key outputs #:allow-other-keys)
126 (install-file "contrib/bash-completion/megatools"
127 (string-append (assoc-ref outputs "out")
128 "/etc/bash_completion.d"))
129 #t)))))
3e67182f
JK
130 (native-inputs
131 `(("pkg-config" ,pkg-config)
132 ;; For documentation
133 ("asciidoc" ,asciidoc)))
134 (inputs
135 `(("curl" ,curl)
136 ("glib" ,glib)
137 ("openssl" ,openssl)))
138 (home-page "https://megatools.megous.com/")
139 (synopsis "Command line client application for mega.nz")
140 (description "Megatools is a collection of programs for accessing the mega.nz service
141from the command line.
142
143Megatools allow you to copy individual files as well as entire directory trees to and from
144the cloud. You can also perform streaming downloads for example to preview videos and
145audio files, without needing to download the entire file first.
146
147Megatools are robust and optimized for fast operation - as fast as Mega servers allow.
148Memory requirements and CPU utilization are kept at minimum.
149
150See also: megacmd, the official tool set by MEGA.")
151 (license license:gpl2)))
152
b2e93b9e
EF
153(define-public owncloud-client
154 (package
155 (name "owncloud-client")
b6f69340 156 (version "2.5.3.11470")
b2e93b9e
EF
157 (source
158 (origin
159 (method url-fetch)
160 (uri (string-append "https://download.owncloud.com/desktop/stable/"
161 "owncloudclient-" version ".tar.xz"))
162 (sha256
b6f69340 163 (base32 "0cznis8qadsnlgm046lxn8vmbxli6zp4b8nk93n53mkfxlcw355n"))
6563d58c 164 (patches (search-patches "owncloud-disable-updatecheck.patch"))
5fc4df0c
EF
165 (modules '((guix build utils)))
166 (snippet
167 '(begin
e718ce14 168 ;; libcrashreporter-qt has its own bundled dependencies
5fc4df0c 169 (delete-file-recursively "src/3rdparty/libcrashreporter-qt")
5fc4df0c 170 (delete-file-recursively "src/3rdparty/sqlite3")
e718ce14 171 ;; qprogessindicator, qlockedfile, qtokenizer and
5fc4df0c
EF
172 ;; qtsingleapplication have not yet been packaged, but all are
173 ;; explicitly used from the 3rdparty folder during build.
174 ;; We can also remove the macgoodies folder
6cbee49d
MW
175 (delete-file-recursively "src/3rdparty/qtmacgoodies")
176 #t))))
b2e93b9e
EF
177 (build-system cmake-build-system)
178 (arguments
179 `(#:phases
180 (modify-phases %standard-phases
2523691a 181 (add-after 'unpack 'delete-failing-tests
be58ffa4 182 ;; "Could not create autostart folder"
2523691a
EF
183 (lambda _
184 (substitute* "test/CMakeLists.txt"
2523691a
EF
185 (("owncloud_add_test\\(Utility \"\"\\)" test)
186 (string-append "#" test)))
2b371f4d
EF
187 #t))
188 (add-after 'unpack 'dont-embed-store-path
189 (lambda _
190 (substitute* "src/common/utility_unix.cpp"
191 (("QCoreApplication::applicationFilePath\\()") "\"owncloud\""))
192 #t))
193 (delete 'patch-dot-desktop-files))
e718ce14
EF
194 #:configure-flags '("-DUNIT_TESTING=ON"
195 ;; build without qtwebkit, which causes the
196 ;; package to FTBFS while looking for QWebView.
197 "-DNO_SHIBBOLETH=1")))
2523691a
EF
198 (native-inputs
199 `(("cmocka" ,cmocka)
200 ("perl" ,perl)
201 ("pkg-config" ,pkg-config)
202 ("qtlinguist" ,qttools)))
b2e93b9e 203 (inputs
e718ce14 204 `(("qtbase" ,qtbase)
b2e93b9e 205 ("qtkeychain" ,qtkeychain)
b2e93b9e
EF
206 ("sqlite" ,sqlite)
207 ("zlib" ,zlib)))
208 (home-page "https://owncloud.org")
209 (synopsis "Folder synchronization with an ownCloud server")
210 (description "The ownCloudSync system lets you always have your latest
211files wherever you are. Just specify one or more folders on the local machine
212to and a server to synchronize to. You can configure more computers to
213synchronize to the same server and any change to the files on one computer will
214silently and reliably flow across to every other.")
215 (license license:gpl2+)))
cf3504c6
EF
216
217(define-public qsyncthingtray
218 (package
219 (name "qsyncthingtray")
dc05f652 220 (version "0.5.8")
cf3504c6
EF
221 (source
222 (origin
afbf9763
EF
223 (method git-fetch)
224 (uri (git-reference
225 (url "https://github.com/sieren/QSyncthingTray")
226 (commit version)))
227 (file-name (git-file-name name version))
cf3504c6
EF
228 (sha256
229 (base32
afbf9763 230 "1n9g4j7qznvg9zl6x163pi9f7wsc3x6q76i33psnm7x2v1i22x5w"))))
cf3504c6
EF
231 (build-system cmake-build-system)
232 (arguments
233 `(#:configure-flags '("-DQST_BUILD_WEBKIT=1")
234 #:phases
235 (modify-phases %standard-phases
236 ;; The program is meant to be run from the git repo or source tarball.
237 (replace 'install
238 (lambda* (#:key outputs #:allow-other-keys)
239 (let* ((out (assoc-ref outputs "out"))
240 (bin (string-append out "/bin")))
241 (install-file "QSyncthingTray" bin)
afbf9763
EF
242 (mkdir-p (string-append out "/share/pixmaps"))
243 (copy-file "../source/resources/images/Icon1024.png"
244 (string-append
245 out "/share/pixmaps/QSyncthingTray.png"))
cf3504c6
EF
246 #t))))
247 #:tests? #f)) ; no test target
248 (inputs
249 `(("qtbase" ,qtbase)
250 ("qtwebkit" ,qtwebkit)))
251 (home-page "https://github.com/sieren/QSyncthingTray")
252 (synopsis "Traybar Application for Syncthing")
253 (description
254 "A traybar application for syncthing.
255@enumerate
256@item Shows number of connections at a glance.
257@item Traffic statistics about incoming, outgoing and total throughput.
258@item Launches Syncthing and Syncthing-iNotifier if specified.
259@item Quickly pause Syncthing with one click.
260@item Last Synced Files - Quickly see the recently synchronised files and open
261their folder.
262@item Quick Access to all shared folders.
263@item Presents Syncthing UI in a separate view instead of using the browser.
264@item Supports authenticated HTTPS connections.
265@item Uses System Notifications about current connection status.
266@item Toggle for monochrome icon.
267@end enumerate\n")
268 (license license:lgpl3+)))
7ee557a7
RW
269
270(define-public lsyncd
271 (package
272 (name "lsyncd")
9358ae8a 273 (version "2.2.2")
7ee557a7
RW
274 (source
275 (origin
836931a5
TGR
276 (method git-fetch)
277 (uri (git-reference
b0e7b699 278 (url "https://github.com/axkibe/lsyncd")
836931a5
TGR
279 (commit (string-append "release-" version))))
280 (file-name (git-file-name name version))
7ee557a7 281 (sha256
836931a5 282 (base32 "1q2ixp52r96ckghgmxdbms6xrq8dbziimp8gmgzqfq4lk1v1w80y"))))
7ee557a7
RW
283 (build-system cmake-build-system)
284 (arguments
285 `(;; The "tests" target is broken and assumes that tests are run in the
286 ;; root directory.
287 #:tests? #f
288 #:test-target "tests"
289 #:phases
290 (modify-phases %standard-phases
d0d54a61
TGR
291 (add-after 'unpack 'search-$PATH-for-binaries
292 ;; lsyncd requires and hard-codes absolute file names to binaries.
293 ;; Make it fall back to searching $PATH for relative file names.
294 (lambda _
295 (substitute* "lsyncd.c"
296 (("execv\\(") "execvp("))
297 (substitute* (list "lsyncd.lua"
298 "default-direct.lua"
299 "default-rsync.lua"
300 "default-rsyncssh.lua")
301 (("(|/usr)/bin/") ""))
302 #t))
7ee557a7 303 (replace 'install
d0d54a61 304 ;; No install target.
7ee557a7
RW
305 (lambda* (#:key outputs #:allow-other-keys)
306 (let* ((out (assoc-ref outputs "out"))
307 (bin (string-append out "/bin"))
308 (man (string-append out "/share/man/man1")))
309 (install-file "lsyncd" bin)
836931a5 310 (install-file "../source/doc/manpage/lsyncd.1" man)
7ee557a7
RW
311 #t))))))
312 (native-inputs
313 `(("lua" ,lua-5.2)))
314 (home-page "https://github.com/axkibe/lsyncd")
315 (synopsis "Synchronize local directories with remote targets")
316 (description "Lsyncd watches a local directory trees event monitor
317interface (inotify or fsevents). It aggregates and combines events for a few
318seconds and then spawns one (or more) process(es) to synchronize the changes.
319By default this is rsync, which must be installed on all source and target
320machines. Lsyncd is thus a light-weight live mirror solution that is
162a1374
TGR
321comparatively easy to install not requiring new file systems or block devices
322and does not hamper local file system performance.")
7ee557a7 323 (license license:gpl2+)))
fe84a00f
LC
324
325(define-public casync
326 (package
327 (name "casync")
328 (version "2")
329 (home-page "https://github.com/systemd/casync/")
330 (source (origin
331 (method git-fetch)
332 (uri (git-reference
333 (url home-page)
334 (commit (string-append "v" version))))
335 (sha256
336 (base32
337 "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88"))
e1f79127
LC
338 (file-name (string-append name "-" version "-checkout"))
339 (patches (search-patches "casync-renameat2-declaration.patch"))))
fe84a00f
LC
340 (build-system meson-build-system)
341 (native-inputs
342 `(("pkg-config" ,pkg-config)
343 ("python-sphinx" ,python-sphinx)
344 ("rsync" ,rsync))) ;for tests
345 (inputs
346 `(("xz" ,xz) ;for liblzma
ec0de9d8 347 ("zstd" ,zstd "lib")
fe84a00f
LC
348 ("curl" ,curl)
349 ("acl" ,acl)
350 ("libselinux" ,libselinux)
351 ("fuse" ,fuse)
352 ("openssl" ,openssl)
353 ("zlib" ,zlib)))
354 (synopsis "File synchronization and backup system")
355 (description
356 "casync is a @dfn{content-addressable data synchronizer} that can be used
357as the basis of a backup system. It is:
358
359@itemize
360@item A combination of the rsync algorithm and content-addressable storage;
361@item An efficient way to store and retrieve multiple related versions of
362large file systems or directory trees;
363@item An efficient way to deliver and update OS, VM, IoT and container images
364over the Internet in an HTTP and CDN friendly way;
365@item An efficient backup system.
366@end itemize\n")
367 (license license:lgpl2.1+)))
47f92fbb
NG
368
369(define-public rclone
370 (package
371 (name "rclone")
1a9ebe3b 372 (version "1.52.3")
dcdc3315
TGR
373 (source
374 (origin
375 (method url-fetch)
d3a8dd2d
NG
376 (uri (string-append "https://github.com/rclone/rclone/releases/download/"
377 "v" version "/rclone-v" version ".tar.gz"))
dcdc3315 378 (sha256
1a9ebe3b 379 (base32 "1pdhsxzc5ch2brfylghc602h9ba3x5dshxm3vcaldrgfac0rx0zl"))))
47f92fbb
NG
380 ;; FIXME: Rclone bundles some libraries Guix already provides. Need to
381 ;; un-bundle them.
382 (build-system go-build-system)
383 (arguments
d3a8dd2d 384 '(#:import-path "github.com/rclone/rclone"
811b907d 385 #:install-source? #f))
47f92fbb
NG
386 (synopsis "@code{rsync} for cloud storage")
387 (description "@code{Rclone} is a command line program to sync files and
388directories to and from different cloud storage providers.
389
390Features include:
391@itemize
392@item MD5/SHA1 hashes checked at all times for file integrity
393@item Timestamps preserved on files
394@item Partial syncs supported on a whole file basis
395@item Copy mode to just copy new/changed files
396@item Sync (one way) mode to make a directory identical
397@item Check mode to check for file hash equality
398@item Can sync to and from network, e.g., two different cloud accounts
399@item Optional encryption (Crypt)
400@item Optional cache (Cache)
401@item Optional FUSE mount (rclone mount)
402@end itemize")
403 (home-page "https://rclone.org/")
404 (license license:expat)))