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