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>
9 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
49 (define-public owncloud-client
51 (name "owncloud-client")
52 (version "2.5.3.11470")
56 (uri (string-append "https://download.owncloud.com/desktop/stable/"
57 "owncloudclient-" version ".tar.xz"))
59 (base32 "0cznis8qadsnlgm046lxn8vmbxli6zp4b8nk93n53mkfxlcw355n"))
60 (patches (search-patches "owncloud-disable-updatecheck.patch"))
61 (modules '((guix build utils)))
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")
73 (build-system cmake-build-system)
76 (modify-phases %standard-phases
77 (add-after 'unpack 'delete-failing-tests
78 ;; "Could not create autostart folder"
80 (substitute* "test/CMakeLists.txt"
81 (("owncloud_add_test\\(Utility \"\"\\)" test)
82 (string-append "#" test)))
84 (add-after 'unpack 'dont-embed-store-path
86 (substitute* "src/common/utility_unix.cpp"
87 (("QCoreApplication::applicationFilePath\\()") "\"owncloud\""))
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")))
97 ("pkg-config" ,pkg-config)
98 ("qtlinguist" ,qttools)))
101 ("qtkeychain" ,qtkeychain)
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+)))
113 (define-public qsyncthingtray
115 (name "qsyncthingtray")
121 (url "https://github.com/sieren/QSyncthingTray")
123 (file-name (git-file-name name version))
126 "1n9g4j7qznvg9zl6x163pi9f7wsc3x6q76i33psnm7x2v1i22x5w"))))
127 (build-system cmake-build-system)
129 `(#:configure-flags '("-DQST_BUILD_WEBKIT=1")
131 (modify-phases %standard-phases
132 ;; The program is meant to be run from the git repo or source tarball.
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"
141 out "/share/pixmaps/QSyncthingTray.png"))
143 #:tests? #f)) ; no test target
146 ("qtwebkit" ,qtwebkit)))
147 (home-page "https://github.com/sieren/QSyncthingTray")
148 (synopsis "Traybar Application for Syncthing")
150 "A traybar application for syncthing.
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
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.
164 (license license:lgpl3+)))
166 (define-public lsyncd
174 (url "https://github.com/axkibe/lsyncd.git")
175 (commit (string-append "release-" version))))
176 (file-name (git-file-name name version))
178 (base32 "1q2ixp52r96ckghgmxdbms6xrq8dbziimp8gmgzqfq4lk1v1w80y"))))
179 (build-system cmake-build-system)
181 `(;; The "tests" target is broken and assumes that tests are run in the
184 #:test-target "tests"
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.
191 (substitute* "lsyncd.c"
192 (("execv\\(") "execvp("))
193 (substitute* (list "lsyncd.lua"
196 "default-rsyncssh.lua")
197 (("(|/usr)/bin/") ""))
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)
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+)))
221 (define-public casync
225 (home-page "https://github.com/systemd/casync/")
230 (commit (string-append "v" version))))
233 "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88"))
234 (file-name (string-append name "-" version "-checkout"))
235 (patches (search-patches "casync-renameat2-declaration.patch"))))
236 (build-system meson-build-system)
238 `(("pkg-config" ,pkg-config)
239 ("python-sphinx" ,python-sphinx)
240 ("rsync" ,rsync))) ;for tests
242 `(("xz" ,xz) ;for liblzma
246 ("libselinux" ,libselinux)
250 (synopsis "File synchronization and backup system")
252 "casync is a @dfn{content-addressable data synchronizer} that can be used
253 as the basis of a backup system. It is:
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.
263 (license license:lgpl2.1+)))
265 (define-public rclone
272 (uri (string-append "https://github.com/rclone/rclone/releases/download/"
273 "v" version "/rclone-v" version ".tar.gz"))
275 (base32 "14b0k5nb85v0mxmdpqxf8avha0wwc3f4dbj1s8h3hkaifa59kn3d"))))
276 ;; FIXME: Rclone bundles some libraries Guix already provides. Need to
278 (build-system go-build-system)
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.
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)
299 (home-page "https://rclone.org/")
300 (license license:expat)))