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, 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>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
59 (define-public megacmd
67 (url "https://github.com/meganz/MEGAcmd.git")
68 (commit (string-append version "_Linux"))
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.
79 #:configure-flags '("--with-pcre")))
81 `(("autoconf" ,autoconf)
82 ("automake" ,automake)
83 ("libtool" ,libtool)))
86 ("crypto++" ,crypto++)
88 ("freeimage" ,freeimage)
92 ("readline" ,readline)
96 (home-page "https://mega.nz/cmd")
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.
104 See also: megatools, a third-party alternative more commonly packaged in other
106 (license (list license:bsd-2 license:gpl3+))))
108 (define-public megatools
115 (uri (string-append "https://megatools.megous.com/builds/megatools-"
119 "12n32w5mqvpk0hvh9yg9qkj9i0g2wp7jp9rq28bnqs94iv3897hp"))))
120 (build-system gnu-build-system)
122 `(("pkg-config" ,pkg-config)
124 ("asciidoc" ,asciidoc)))
128 ("openssl" ,openssl)))
129 (home-page "https://megatools.megous.com/")
130 (synopsis "Command line client application for mega.nz")
131 (description "Megatools is a collection of programs for accessing the mega.nz service
132 from the command line.
134 Megatools allow you to copy individual files as well as entire directory trees to and from
135 the cloud. You can also perform streaming downloads for example to preview videos and
136 audio files, without needing to download the entire file first.
138 Megatools are robust and optimized for fast operation - as fast as Mega servers allow.
139 Memory requirements and CPU utilization are kept at minimum.
141 See also: megacmd, the official tool set by MEGA.")
142 (license license:gpl2)))
144 (define-public owncloud-client
146 (name "owncloud-client")
147 (version "2.5.3.11470")
151 (uri (string-append "https://download.owncloud.com/desktop/stable/"
152 "owncloudclient-" version ".tar.xz"))
154 (base32 "0cznis8qadsnlgm046lxn8vmbxli6zp4b8nk93n53mkfxlcw355n"))
155 (patches (search-patches "owncloud-disable-updatecheck.patch"))
156 (modules '((guix build utils)))
159 ;; libcrashreporter-qt has its own bundled dependencies
160 (delete-file-recursively "src/3rdparty/libcrashreporter-qt")
161 (delete-file-recursively "src/3rdparty/sqlite3")
162 ;; qprogessindicator, qlockedfile, qtokenizer and
163 ;; qtsingleapplication have not yet been packaged, but all are
164 ;; explicitly used from the 3rdparty folder during build.
165 ;; We can also remove the macgoodies folder
166 (delete-file-recursively "src/3rdparty/qtmacgoodies")
168 (build-system cmake-build-system)
171 (modify-phases %standard-phases
172 (add-after 'unpack 'delete-failing-tests
173 ;; "Could not create autostart folder"
175 (substitute* "test/CMakeLists.txt"
176 (("owncloud_add_test\\(Utility \"\"\\)" test)
177 (string-append "#" test)))
179 (add-after 'unpack 'dont-embed-store-path
181 (substitute* "src/common/utility_unix.cpp"
182 (("QCoreApplication::applicationFilePath\\()") "\"owncloud\""))
184 (delete 'patch-dot-desktop-files))
185 #:configure-flags '("-DUNIT_TESTING=ON"
186 ;; build without qtwebkit, which causes the
187 ;; package to FTBFS while looking for QWebView.
188 "-DNO_SHIBBOLETH=1")))
192 ("pkg-config" ,pkg-config)
193 ("qtlinguist" ,qttools)))
196 ("qtkeychain" ,qtkeychain)
199 (home-page "https://owncloud.org")
200 (synopsis "Folder synchronization with an ownCloud server")
201 (description "The ownCloudSync system lets you always have your latest
202 files wherever you are. Just specify one or more folders on the local machine
203 to and a server to synchronize to. You can configure more computers to
204 synchronize to the same server and any change to the files on one computer will
205 silently and reliably flow across to every other.")
206 (license license:gpl2+)))
208 (define-public qsyncthingtray
210 (name "qsyncthingtray")
216 (url "https://github.com/sieren/QSyncthingTray")
218 (file-name (git-file-name name version))
221 "1n9g4j7qznvg9zl6x163pi9f7wsc3x6q76i33psnm7x2v1i22x5w"))))
222 (build-system cmake-build-system)
224 `(#:configure-flags '("-DQST_BUILD_WEBKIT=1")
226 (modify-phases %standard-phases
227 ;; The program is meant to be run from the git repo or source tarball.
229 (lambda* (#:key outputs #:allow-other-keys)
230 (let* ((out (assoc-ref outputs "out"))
231 (bin (string-append out "/bin")))
232 (install-file "QSyncthingTray" bin)
233 (mkdir-p (string-append out "/share/pixmaps"))
234 (copy-file "../source/resources/images/Icon1024.png"
236 out "/share/pixmaps/QSyncthingTray.png"))
238 #:tests? #f)) ; no test target
241 ("qtwebkit" ,qtwebkit)))
242 (home-page "https://github.com/sieren/QSyncthingTray")
243 (synopsis "Traybar Application for Syncthing")
245 "A traybar application for syncthing.
247 @item Shows number of connections at a glance.
248 @item Traffic statistics about incoming, outgoing and total throughput.
249 @item Launches Syncthing and Syncthing-iNotifier if specified.
250 @item Quickly pause Syncthing with one click.
251 @item Last Synced Files - Quickly see the recently synchronised files and open
253 @item Quick Access to all shared folders.
254 @item Presents Syncthing UI in a separate view instead of using the browser.
255 @item Supports authenticated HTTPS connections.
256 @item Uses System Notifications about current connection status.
257 @item Toggle for monochrome icon.
259 (license license:lgpl3+)))
261 (define-public lsyncd
269 (url "https://github.com/axkibe/lsyncd.git")
270 (commit (string-append "release-" version))))
271 (file-name (git-file-name name version))
273 (base32 "1q2ixp52r96ckghgmxdbms6xrq8dbziimp8gmgzqfq4lk1v1w80y"))))
274 (build-system cmake-build-system)
276 `(;; The "tests" target is broken and assumes that tests are run in the
279 #:test-target "tests"
281 (modify-phases %standard-phases
282 (add-after 'unpack 'search-$PATH-for-binaries
283 ;; lsyncd requires and hard-codes absolute file names to binaries.
284 ;; Make it fall back to searching $PATH for relative file names.
286 (substitute* "lsyncd.c"
287 (("execv\\(") "execvp("))
288 (substitute* (list "lsyncd.lua"
291 "default-rsyncssh.lua")
292 (("(|/usr)/bin/") ""))
295 ;; No install target.
296 (lambda* (#:key outputs #:allow-other-keys)
297 (let* ((out (assoc-ref outputs "out"))
298 (bin (string-append out "/bin"))
299 (man (string-append out "/share/man/man1")))
300 (install-file "lsyncd" bin)
301 (install-file "../source/doc/manpage/lsyncd.1" man)
305 (home-page "https://github.com/axkibe/lsyncd")
306 (synopsis "Synchronize local directories with remote targets")
307 (description "Lsyncd watches a local directory trees event monitor
308 interface (inotify or fsevents). It aggregates and combines events for a few
309 seconds and then spawns one (or more) process(es) to synchronize the changes.
310 By default this is rsync, which must be installed on all source and target
311 machines. Lsyncd is thus a light-weight live mirror solution that is
312 comparatively easy to install not requiring new file systems or block devices
313 and does not hamper local file system performance.")
314 (license license:gpl2+)))
316 (define-public casync
320 (home-page "https://github.com/systemd/casync/")
325 (commit (string-append "v" version))))
328 "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88"))
329 (file-name (string-append name "-" version "-checkout"))
330 (patches (search-patches "casync-renameat2-declaration.patch"))))
331 (build-system meson-build-system)
333 `(("pkg-config" ,pkg-config)
334 ("python-sphinx" ,python-sphinx)
335 ("rsync" ,rsync))) ;for tests
337 `(("xz" ,xz) ;for liblzma
341 ("libselinux" ,libselinux)
345 (synopsis "File synchronization and backup system")
347 "casync is a @dfn{content-addressable data synchronizer} that can be used
348 as the basis of a backup system. It is:
351 @item A combination of the rsync algorithm and content-addressable storage;
352 @item An efficient way to store and retrieve multiple related versions of
353 large file systems or directory trees;
354 @item An efficient way to deliver and update OS, VM, IoT and container images
355 over the Internet in an HTTP and CDN friendly way;
356 @item An efficient backup system.
358 (license license:lgpl2.1+)))
360 (define-public rclone
367 (uri (string-append "https://github.com/rclone/rclone/releases/download/"
368 "v" version "/rclone-v" version ".tar.gz"))
370 (base32 "0lvmm3qpdix4mnip1dfyawsdvzbcdxw0b0zz7xbgmicbfv1vlpx9"))))
371 ;; FIXME: Rclone bundles some libraries Guix already provides. Need to
373 (build-system go-build-system)
375 '(#:import-path "github.com/rclone/rclone"
376 #:install-source? #f))
377 (synopsis "@code{rsync} for cloud storage")
378 (description "@code{Rclone} is a command line program to sync files and
379 directories to and from different cloud storage providers.
383 @item MD5/SHA1 hashes checked at all times for file integrity
384 @item Timestamps preserved on files
385 @item Partial syncs supported on a whole file basis
386 @item Copy mode to just copy new/changed files
387 @item Sync (one way) mode to make a directory identical
388 @item Check mode to check for file hash equality
389 @item Can sync to and from network, e.g., two different cloud accounts
390 @item Optional encryption (Crypt)
391 @item Optional cache (Cache)
392 @item Optional FUSE mount (rclone mount)
394 (home-page "https://rclone.org/")
395 (license license:expat)))