Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / sync.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages sync)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix build-system cmake)
25 #:use-module (guix build-system meson)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix packages)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages acl)
31 #:use-module (gnu packages check)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages curl)
34 #:use-module (gnu packages databases)
35 #:use-module (gnu packages linux)
36 #:use-module (gnu packages lua)
37 #:use-module (gnu packages perl)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages qt)
41 #:use-module (gnu packages rsync)
42 #:use-module (gnu packages selinux)
43 #:use-module (gnu packages tls))
44
45 (define-public owncloud-client
46 (package
47 (name "owncloud-client")
48 (version "2.4.1")
49 (source
50 (origin
51 (method url-fetch)
52 (uri (string-append "https://download.owncloud.com/desktop/stable/"
53 "owncloudclient-" version ".tar.xz"))
54 (sha256
55 (base32 "08xayz0alvypwa1bjmw1rmh4m3sclld4yq7kcbf264983icawqj4"))
56 (patches (search-patches "owncloud-disable-updatecheck.patch"))
57 (modules '((guix build utils)))
58 (snippet
59 '(begin
60 ;; libcrashreporter-qt has its own bundled dependencies
61 (delete-file-recursively "src/3rdparty/libcrashreporter-qt")
62 (delete-file-recursively "src/3rdparty/sqlite3")
63 ;; qprogessindicator, qlockedfile, qtokenizer and
64 ;; qtsingleapplication have not yet been packaged, but all are
65 ;; explicitly used from the 3rdparty folder during build.
66 ;; We can also remove the macgoodies folder
67 (delete-file-recursively "src/3rdparty/qtmacgoodies")
68 #t))))
69 (build-system cmake-build-system)
70 (arguments
71 `(#:phases
72 (modify-phases %standard-phases
73 (add-after 'unpack 'delete-failing-tests
74 ;; "Could not create autostart folder"
75 (lambda _
76 (substitute* "test/CMakeLists.txt"
77 (("owncloud_add_test\\(Utility \"\"\\)" test)
78 (string-append "#" test)))
79 #t)))
80 #:configure-flags '("-DUNIT_TESTING=ON"
81 ;; build without qtwebkit, which causes the
82 ;; package to FTBFS while looking for QWebView.
83 "-DNO_SHIBBOLETH=1")))
84 (native-inputs
85 `(("cmocka" ,cmocka)
86 ("perl" ,perl)
87 ("pkg-config" ,pkg-config)
88 ("qtlinguist" ,qttools)))
89 (inputs
90 `(("qtbase" ,qtbase)
91 ("qtkeychain" ,qtkeychain)
92 ("sqlite" ,sqlite)
93 ("zlib" ,zlib)))
94 (home-page "https://owncloud.org")
95 (synopsis "Folder synchronization with an ownCloud server")
96 (description "The ownCloudSync system lets you always have your latest
97 files wherever you are. Just specify one or more folders on the local machine
98 to and a server to synchronize to. You can configure more computers to
99 synchronize to the same server and any change to the files on one computer will
100 silently and reliably flow across to every other.")
101 (license license:gpl2+)))
102
103 (define-public qsyncthingtray
104 (package
105 (name "qsyncthingtray")
106 (version "0.5.8")
107 (source
108 (origin
109 (method url-fetch)
110 (uri (string-append
111 "https://github.com/sieren/QSyncthingTray/archive/"
112 version ".tar.gz"))
113 (file-name (string-append name "-" version ".tar.gz"))
114 (sha256
115 (base32
116 "1024778ml7q62ziqm4d22z5sc1715l34846pwfyzfpcyl32qlhpz"))))
117 (build-system cmake-build-system)
118 (arguments
119 `(#:configure-flags '("-DQST_BUILD_WEBKIT=1")
120 #:phases
121 (modify-phases %standard-phases
122 ;; The program is meant to be run from the git repo or source tarball.
123 (replace 'install
124 (lambda* (#:key outputs #:allow-other-keys)
125 (let* ((out (assoc-ref outputs "out"))
126 (bin (string-append out "/bin")))
127 (install-file "QSyncthingTray" bin)
128 (install-file (string-append
129 "../QSyncthingTray-"
130 ,(package-version qsyncthingtray)
131 "/resources/images/Icon1024.png")
132 (string-append
133 out "/share/pixmaps/QSyncthingTray.png"))
134 #t))))
135 #:tests? #f)) ; no test target
136 (inputs
137 `(("qtbase" ,qtbase)
138 ("qtwebkit" ,qtwebkit)))
139 (home-page "https://github.com/sieren/QSyncthingTray")
140 (synopsis "Traybar Application for Syncthing")
141 (description
142 "A traybar application for syncthing.
143 @enumerate
144 @item Shows number of connections at a glance.
145 @item Traffic statistics about incoming, outgoing and total throughput.
146 @item Launches Syncthing and Syncthing-iNotifier if specified.
147 @item Quickly pause Syncthing with one click.
148 @item Last Synced Files - Quickly see the recently synchronised files and open
149 their folder.
150 @item Quick Access to all shared folders.
151 @item Presents Syncthing UI in a separate view instead of using the browser.
152 @item Supports authenticated HTTPS connections.
153 @item Uses System Notifications about current connection status.
154 @item Toggle for monochrome icon.
155 @end enumerate\n")
156 (license license:lgpl3+)))
157
158 (define-public lsyncd
159 (package
160 (name "lsyncd")
161 (version "2.2.2")
162 (source
163 (origin
164 (method url-fetch)
165 (uri (string-append "https://github.com/axkibe/lsyncd/archive/release-"
166 version ".tar.gz"))
167 (file-name (string-append name "-" version ".tar.gz"))
168 (sha256
169 (base32
170 "02g054qv8rnbxywd4f0gnd13lrlns9175d3ciqnyslhs1zs15nqb"))))
171 (build-system cmake-build-system)
172 (arguments
173 `(;; The "tests" target is broken and assumes that tests are run in the
174 ;; root directory.
175 #:tests? #f
176 #:test-target "tests"
177 #:phases
178 (modify-phases %standard-phases
179 ;; No install target.
180 (replace 'install
181 (lambda* (#:key outputs #:allow-other-keys)
182 (let* ((out (assoc-ref outputs "out"))
183 (bin (string-append out "/bin"))
184 (man (string-append out "/share/man/man1")))
185 (install-file "lsyncd" bin)
186 (install-file (string-append "../lsyncd-release-"
187 ,version
188 "/doc/manpage/lsyncd.1")
189 man)
190 #t))))))
191 (native-inputs
192 `(("lua" ,lua-5.2)))
193 (home-page "https://github.com/axkibe/lsyncd")
194 (synopsis "Synchronize local directories with remote targets")
195 (description "Lsyncd watches a local directory trees event monitor
196 interface (inotify or fsevents). It aggregates and combines events for a few
197 seconds and then spawns one (or more) process(es) to synchronize the changes.
198 By default this is rsync, which must be installed on all source and target
199 machines. Lsyncd is thus a light-weight live mirror solution that is
200 comparatively easy to install not requiring new file systems or block devices
201 and does not hamper local file system performance.")
202 (license license:gpl2+)))
203
204 (define-public casync
205 (package
206 (name "casync")
207 (version "2")
208 (home-page "https://github.com/systemd/casync/")
209 (source (origin
210 (method git-fetch)
211 (uri (git-reference
212 (url home-page)
213 (commit (string-append "v" version))))
214 (sha256
215 (base32
216 "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88"))
217 (file-name (string-append name "-" version "-checkout"))
218 (patches (search-patches "casync-renameat2-declaration.patch"))))
219 (build-system meson-build-system)
220 (native-inputs
221 `(("pkg-config" ,pkg-config)
222 ("python-sphinx" ,python-sphinx)
223 ("rsync" ,rsync))) ;for tests
224 (inputs
225 `(("xz" ,xz) ;for liblzma
226 ("zstd" ,zstd)
227 ("curl" ,curl)
228 ("acl" ,acl)
229 ("libselinux" ,libselinux)
230 ("fuse" ,fuse)
231 ("openssl" ,openssl)
232 ("zlib" ,zlib)))
233 (synopsis "File synchronization and backup system")
234 (description
235 "casync is a @dfn{content-addressable data synchronizer} that can be used
236 as the basis of a backup system. It is:
237
238 @itemize
239 @item A combination of the rsync algorithm and content-addressable storage;
240 @item An efficient way to store and retrieve multiple related versions of
241 large file systems or directory trees;
242 @item An efficient way to deliver and update OS, VM, IoT and container images
243 over the Internet in an HTTP and CDN friendly way;
244 @item An efficient backup system.
245 @end itemize\n")
246 (license license:lgpl2.1+)))