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