gnu: emacs-ox-pandoc: Use pandoc instead of ghc-pandoc.
[jackhill/guix/guix.git] / gnu / packages / sync.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
7 ;;; Copyright © 2019 Clément Lassieur <clement@lassieur.org>
8 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
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
25 (define-module (gnu packages sync)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system go)
30 #:use-module (guix build-system meson)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix packages)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages acl)
36 #:use-module (gnu packages adns)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages crypto)
41 #:use-module (gnu packages curl)
42 #:use-module (gnu packages documentation)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages golang)
45 #:use-module (gnu packages image)
46 #:use-module (gnu packages linux)
47 #:use-module (gnu packages lua)
48 #:use-module (gnu packages pcre)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages qt)
52 #:use-module (gnu packages readline)
53 #:use-module (gnu packages rsync)
54 #:use-module (gnu packages selinux)
55 #:use-module (gnu packages sphinx)
56 #:use-module (gnu packages sqlite)
57 #:use-module (gnu packages tls))
58
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
67 (url "https://github.com/meganz/MEGAcmd")
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
100 to offer all the functionality of a MEGA account via commands. It features
101 synchronization, backup of local folders into a MEGA account and a
102 webdav/streaming server.
103
104 See also: megatools, a third-party alternative more commonly packaged in other
105 distributions.")
106 (license (list license:bsd-2 license:gpl3+))))
107
108 (define-public megatools
109 (package
110 (name "megatools")
111 (version "1.10.3")
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
119 "1nwbalc54iz6616liyxfalf5yafwx0iv6cmqgvg4kz9khqscmhcd"))))
120 (build-system gnu-build-system)
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)))))
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
141 from the command line.
142
143 Megatools allow you to copy individual files as well as entire directory trees to and from
144 the cloud. You can also perform streaming downloads for example to preview videos and
145 audio files, without needing to download the entire file first.
146
147 Megatools are robust and optimized for fast operation - as fast as Mega servers allow.
148 Memory requirements and CPU utilization are kept at minimum.
149
150 See also: megacmd, the official tool set by MEGA.")
151 (license license:gpl2)))
152
153 (define-public owncloud-client
154 (package
155 (name "owncloud-client")
156 (version "2.5.3.11470")
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
163 (base32 "0cznis8qadsnlgm046lxn8vmbxli6zp4b8nk93n53mkfxlcw355n"))
164 (patches (search-patches "owncloud-disable-updatecheck.patch"))
165 (modules '((guix build utils)))
166 (snippet
167 '(begin
168 ;; libcrashreporter-qt has its own bundled dependencies
169 (delete-file-recursively "src/3rdparty/libcrashreporter-qt")
170 (delete-file-recursively "src/3rdparty/sqlite3")
171 ;; qprogessindicator, qlockedfile, qtokenizer and
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
175 (delete-file-recursively "src/3rdparty/qtmacgoodies")
176 #t))))
177 (build-system cmake-build-system)
178 (arguments
179 `(#:phases
180 (modify-phases %standard-phases
181 (add-after 'unpack 'delete-failing-tests
182 ;; "Could not create autostart folder"
183 (lambda _
184 (substitute* "test/CMakeLists.txt"
185 (("owncloud_add_test\\(Utility \"\"\\)" test)
186 (string-append "#" test)))
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))
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")))
198 (native-inputs
199 `(("cmocka" ,cmocka)
200 ("perl" ,perl)
201 ("pkg-config" ,pkg-config)
202 ("qtlinguist" ,qttools)))
203 (inputs
204 `(("qtbase" ,qtbase)
205 ("qtkeychain" ,qtkeychain)
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
211 files wherever you are. Just specify one or more folders on the local machine
212 to and a server to synchronize to. You can configure more computers to
213 synchronize to the same server and any change to the files on one computer will
214 silently and reliably flow across to every other.")
215 (license license:gpl2+)))
216
217 (define-public qsyncthingtray
218 (package
219 (name "qsyncthingtray")
220 (version "0.5.8")
221 (source
222 (origin
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))
228 (sha256
229 (base32
230 "1n9g4j7qznvg9zl6x163pi9f7wsc3x6q76i33psnm7x2v1i22x5w"))))
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)
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"))
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
261 their 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+)))
269
270 (define-public lsyncd
271 (package
272 (name "lsyncd")
273 (version "2.2.2")
274 (source
275 (origin
276 (method git-fetch)
277 (uri (git-reference
278 (url "https://github.com/axkibe/lsyncd")
279 (commit (string-append "release-" version))))
280 (file-name (git-file-name name version))
281 (sha256
282 (base32 "1q2ixp52r96ckghgmxdbms6xrq8dbziimp8gmgzqfq4lk1v1w80y"))))
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
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))
303 (replace 'install
304 ;; No install target.
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)
310 (install-file "../source/doc/manpage/lsyncd.1" man)
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
317 interface (inotify or fsevents). It aggregates and combines events for a few
318 seconds and then spawns one (or more) process(es) to synchronize the changes.
319 By default this is rsync, which must be installed on all source and target
320 machines. Lsyncd is thus a light-weight live mirror solution that is
321 comparatively easy to install not requiring new file systems or block devices
322 and does not hamper local file system performance.")
323 (license license:gpl2+)))
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"))
338 (file-name (string-append name "-" version "-checkout"))
339 (patches (search-patches "casync-renameat2-declaration.patch"))))
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
347 ("zstd" ,zstd "lib")
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
357 as 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
362 large file systems or directory trees;
363 @item An efficient way to deliver and update OS, VM, IoT and container images
364 over the Internet in an HTTP and CDN friendly way;
365 @item An efficient backup system.
366 @end itemize\n")
367 (license license:lgpl2.1+)))
368
369 (define-public rclone
370 (package
371 (name "rclone")
372 (version "1.52.3")
373 (source
374 (origin
375 (method url-fetch)
376 (uri (string-append "https://github.com/rclone/rclone/releases/download/"
377 "v" version "/rclone-v" version ".tar.gz"))
378 (sha256
379 (base32 "1pdhsxzc5ch2brfylghc602h9ba3x5dshxm3vcaldrgfac0rx0zl"))))
380 ;; FIXME: Rclone bundles some libraries Guix already provides. Need to
381 ;; un-bundle them.
382 (build-system go-build-system)
383 (arguments
384 '(#:import-path "github.com/rclone/rclone"
385 #:install-source? #f))
386 (synopsis "@code{rsync} for cloud storage")
387 (description "@code{Rclone} is a command line program to sync files and
388 directories to and from different cloud storage providers.
389
390 Features 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)))