sync.scm 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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, 2021 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>
  9. ;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
  10. ;;;
  11. ;;; This file is part of GNU Guix.
  12. ;;;
  13. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  14. ;;; under the terms of the GNU General Public License as published by
  15. ;;; the Free Software Foundation; either version 3 of the License, or (at
  16. ;;; your option) any later version.
  17. ;;;
  18. ;;; GNU Guix is distributed in the hope that it will be useful, but
  19. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;;; GNU General Public License for more details.
  22. ;;;
  23. ;;; You should have received a copy of the GNU General Public License
  24. ;;; 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 copy)
  29. #:use-module (guix build-system gnu)
  30. #:use-module (guix build-system go)
  31. #:use-module (guix build-system meson)
  32. #:use-module (guix build-system qt)
  33. #:use-module (guix download)
  34. #:use-module (guix git-download)
  35. #:use-module (guix packages)
  36. #:use-module (gnu packages)
  37. #:use-module (gnu packages acl)
  38. #:use-module (gnu packages adns)
  39. #:use-module (gnu packages autotools)
  40. #:use-module (gnu packages check)
  41. #:use-module (gnu packages compression)
  42. #:use-module (gnu packages crypto)
  43. #:use-module (gnu packages curl)
  44. #:use-module (gnu packages documentation)
  45. #:use-module (gnu packages freedesktop)
  46. #:use-module (gnu packages glib)
  47. #:use-module (gnu packages gnome)
  48. #:use-module (gnu packages golang)
  49. #:use-module (gnu packages graphviz)
  50. #:use-module (gnu packages image)
  51. #:use-module (gnu packages kde-frameworks)
  52. #:use-module (gnu packages linux)
  53. #:use-module (gnu packages lua)
  54. #:use-module (gnu packages ocaml)
  55. #:use-module (gnu packages pcre)
  56. #:use-module (gnu packages perl)
  57. #:use-module (gnu packages pkg-config)
  58. #:use-module (gnu packages python)
  59. #:use-module (gnu packages python-xyz)
  60. #:use-module (gnu packages qt)
  61. #:use-module (gnu packages readline)
  62. #:use-module (gnu packages rsync)
  63. #:use-module (gnu packages ruby)
  64. #:use-module (gnu packages selinux)
  65. #:use-module (gnu packages shells)
  66. #:use-module (gnu packages sphinx)
  67. #:use-module (gnu packages sqlite)
  68. #:use-module (gnu packages tls))
  69. (define-public nextcloud-client
  70. (package
  71. (name "nextcloud-client")
  72. (version "3.1.3")
  73. (source
  74. (origin
  75. (method git-fetch)
  76. (uri
  77. (git-reference
  78. (url "https://github.com/nextcloud/desktop")
  79. (commit (string-append "v" version))))
  80. (file-name
  81. (git-file-name name version))
  82. (sha256
  83. (base32 "15ymk3gvfmgwzmqbhlw7jjy9y65ib3391h1dlmpll65iaj2miajk"))
  84. (modules '((guix build utils)
  85. (ice-9 ftw)
  86. (srfi srfi-1)))
  87. (snippet
  88. '(begin
  89. ;; Not available in Guix.
  90. (let* ((keep '("QProgressIndicator" "qtokenizer")))
  91. (with-directory-excursion "src/3rdparty"
  92. (for-each delete-file-recursively
  93. (lset-difference string=?
  94. (scandir ".")
  95. (cons* "." ".." keep)))))
  96. (with-directory-excursion "src/gui"
  97. (substitute* "CMakeLists.txt"
  98. ;; Remove references of deleted 3rdparties.
  99. (("[ \t]*\\.\\./3rdparty/qtlockedfile/?.*\\.cpp")
  100. "")
  101. (("[ \t]*\\.\\./3rdparty/qtsingleapplication/?.*\\.cpp")
  102. "")
  103. (("[ \t]*\\.\\./3rdparty/kmessagewidget/?.*\\.cpp")
  104. "")
  105. (("[ \t]*list\\(APPEND 3rdparty_SRC \\.\\./3rdparty/?.*\\)")
  106. "")
  107. (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtlockedfile")
  108. "")
  109. (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/qtsingleapplication")
  110. "")
  111. (("\\$\\{CMAKE_SOURCE_DIR\\}/src/3rdparty/kmessagewidget")
  112. ;; For this, we rely on build inputs, so let's just replace
  113. ;; them by an autoconf-style variable.
  114. "@kwidgetsaddons@")
  115. ;; Expand libraries, that used to be statically linked, but
  116. ;; no longer are post-vendoring.
  117. (("\\$\\{synclib_NAME\\}")
  118. (string-append "${synclib_NAME} "
  119. "QtSolutions_LockedFile "
  120. "QtSolutions_SingleApplication "
  121. "KF5WidgetsAddons")))
  122. ;; Fix compatibility with QtSingleApplication from QtSolutions.
  123. (substitute* '("application.h" "application.cpp")
  124. (("SharedTools::QtSingleApplication")
  125. "QtSingleApplication")
  126. (("slotParseMessage\\(const QString &(msg)?.*\\)")
  127. "slotParseMessage(const QString &msg)")))
  128. #t))))
  129. (build-system qt-build-system)
  130. (arguments
  131. `(#:configure-flags
  132. (list
  133. "-DUNIT_TESTING=ON"
  134. ;; Upstream Bug: https://github.com/nextcloud/desktop/issues/2885
  135. "-DNO_SHIBBOLETH=ON")
  136. #:imported-modules
  137. ((guix build glib-or-gtk-build-system)
  138. ,@%qt-build-system-modules)
  139. #:modules
  140. (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
  141. (guix build qt-build-system)
  142. (guix build utils))
  143. #:phases
  144. (modify-phases %standard-phases
  145. (add-after 'unpack 'patch-cmake
  146. (lambda* (#:key inputs #:allow-other-keys)
  147. ;; Patch install directory for dbus service files.
  148. (substitute* "shell_integration/libcloudproviders/CMakeLists.txt"
  149. (("PKGCONFIG_GETVAR\\(.+ _install_dir\\)")
  150. (string-append "set(_install_dir \"${CMAKE_INSTALL_PREFIX}"
  151. "/share/dbus-1/services\")")))
  152. (substitute* "shell_integration/dolphin/CMakeLists.txt"
  153. ;; Make sure, that Qt modules are installed under $prefix.
  154. (("ON CACHE") "OFF CACHE"))
  155. (substitute* "src/gui/CMakeLists.txt"
  156. (("@kwidgetsaddons@")
  157. (search-input-directory inputs
  158. "/include/KF5/KWidgetsAddons/")))))
  159. (add-before 'check 'pre-check
  160. (lambda _
  161. ;; Tests write to $HOME.
  162. (setenv "HOME" (getcwd))
  163. #t))
  164. (add-after 'install 'glib-or-gtk-compile-schemas
  165. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
  166. (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
  167. (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
  168. (native-inputs
  169. `(("cmocka" ,cmocka)
  170. ("dot" ,graphviz)
  171. ("doxygen" ,doxygen)
  172. ("extra-cmake-modules" ,extra-cmake-modules)
  173. ("glib:bin" ,glib "bin")
  174. ("perl" ,perl)
  175. ("pkg-config" ,pkg-config)
  176. ("python" ,python-wrapper)
  177. ("qttools" ,qttools)
  178. ("ruby" ,ruby)))
  179. (inputs
  180. `(("appstream" ,appstream)
  181. ("desktop-file-utils" ,desktop-file-utils)
  182. ("glib" ,glib)
  183. ("kconfig" ,kconfig)
  184. ("kcoreaddons" ,kcoreaddons)
  185. ("kio" ,kio)
  186. ("kjs" ,kjs)
  187. ("kwidgetsaddons" ,kwidgetsaddons)
  188. ("libcloudproviders" ,libcloudproviders)
  189. ("libzip" ,libzip)
  190. ("openssl" ,openssl)
  191. ("python-nautilus" ,python-nautilus)
  192. ("qtbase" ,qtbase-5)
  193. ("qtdeclarative" ,qtdeclarative)
  194. ("qtgraphicaleffects" ,qtgraphicaleffects)
  195. ("qtkeychain" ,qtkeychain)
  196. ("qtquickcontrols2" ,qtquickcontrols2)
  197. ("qtsolutions" ,qtsolutions)
  198. ("qtsvg" ,qtsvg)
  199. ("qtwebchannel" ,qtwebchannel)
  200. ("qtwebsockets" ,qtwebsockets)
  201. ("qtwebkit" ,qtwebkit)
  202. ("sqlite" ,sqlite)
  203. ("xdg-utils" ,xdg-utils)
  204. ("zlib" ,zlib)))
  205. (propagated-inputs
  206. `(("qtwebengine" ,qtwebengine)))
  207. (synopsis "Desktop sync client for Nextcloud")
  208. (description "Nextcloud-Desktop is a tool to synchronize files from
  209. Nextcloud Server with your computer.")
  210. (home-page "https://nextcloud.com")
  211. (license (list license:expat ; QProgressIndicator
  212. license:lgpl2.1+ ; qtokenizer
  213. license:gpl2+))))
  214. (define-public megacmd
  215. (package
  216. (name "megacmd")
  217. (version "1.1.0")
  218. (source
  219. (origin
  220. (method git-fetch)
  221. (uri (git-reference
  222. (url "https://github.com/meganz/MEGAcmd")
  223. (commit (string-append version "_Linux"))
  224. (recursive? #t)))
  225. (sha256
  226. (base32
  227. "004j8m3xs6slx03g2g6wzr97myl2v3zc09wxnfar5c62a625pd53"))
  228. (file-name (git-file-name name version))))
  229. (build-system gnu-build-system)
  230. ;; XXX: Disabling tests because they depend on libgtest.la from googletest,
  231. ;; which is not installed for unclear reasons.
  232. (arguments
  233. `(#:tests? #f
  234. #:configure-flags '("--with-pcre")))
  235. (native-inputs
  236. `(("autoconf" ,autoconf)
  237. ("automake" ,automake)
  238. ("libtool" ,libtool)))
  239. (inputs
  240. `(("c-ares" ,c-ares)
  241. ("crypto++" ,crypto++)
  242. ("curl" ,curl)
  243. ("freeimage" ,freeimage)
  244. ("gtest" ,googletest)
  245. ("openssl" ,openssl)
  246. ("pcre" ,pcre)
  247. ("readline" ,readline)
  248. ("sodium" ,libsodium)
  249. ("sqlite3" ,sqlite)
  250. ("zlib" ,zlib)))
  251. (home-page "https://mega.nz/cmd")
  252. (synopsis
  253. "Command Line Interactive and Scriptable Application to access mega.nz")
  254. (description "MEGAcmd provides non UI access to MEGA services. It intends
  255. to offer all the functionality of a MEGA account via commands. It features
  256. synchronization, backup of local folders into a MEGA account and a
  257. webdav/streaming server.
  258. See also: megatools, a third-party alternative more commonly packaged in other
  259. distributions.")
  260. (license (list license:bsd-2 license:gpl3+))))
  261. (define-public megatools
  262. (package
  263. (name "megatools")
  264. (version "1.10.3")
  265. (source
  266. (origin
  267. (method url-fetch)
  268. (uri (string-append "https://megatools.megous.com/builds/megatools-"
  269. version ".tar.gz"))
  270. (sha256
  271. (base32
  272. "1nwbalc54iz6616liyxfalf5yafwx0iv6cmqgvg4kz9khqscmhcd"))))
  273. (build-system gnu-build-system)
  274. (arguments
  275. '(#:phases
  276. (modify-phases %standard-phases
  277. (add-after 'install 'install-completions
  278. (lambda* (#:key outputs #:allow-other-keys)
  279. (install-file "contrib/bash-completion/megatools"
  280. (string-append (assoc-ref outputs "out")
  281. "/etc/bash_completion.d"))
  282. #t)))))
  283. (native-inputs
  284. `(("pkg-config" ,pkg-config)
  285. ;; For documentation
  286. ("asciidoc" ,asciidoc)))
  287. (inputs
  288. `(("curl" ,curl)
  289. ("glib" ,glib)
  290. ("openssl" ,openssl)))
  291. (home-page "https://megatools.megous.com/")
  292. (synopsis "Command line client application for mega.nz")
  293. (description "Megatools is a collection of programs for accessing the mega.nz service
  294. from the command line.
  295. Megatools allow you to copy individual files as well as entire directory trees to and from
  296. the cloud. You can also perform streaming downloads for example to preview videos and
  297. audio files, without needing to download the entire file first.
  298. Megatools are robust and optimized for fast operation - as fast as Mega servers allow.
  299. Memory requirements and CPU utilization are kept at minimum.
  300. See also: megacmd, the official tool set by MEGA.")
  301. (license license:gpl2)))
  302. (define-public owncloud-client
  303. (package
  304. (name "owncloud-client")
  305. (version "2.9.0.5150")
  306. (source
  307. (origin
  308. (method url-fetch)
  309. (uri (string-append "https://download.owncloud.com/desktop/ownCloud/stable/"
  310. version "/source/ownCloud-" version ".tar.xz"))
  311. (sha256
  312. (base32 "0nf68x840p30yng4fh1nlyiqg40z0rkcv0lskpz8dd4pj1iw5jjs"))
  313. (patches (search-patches "owncloud-disable-updatecheck.patch"))))
  314. ;; TODO: unbundle qprogessindicator, qlockedfile, qtokenizer and
  315. ;; qtsingleapplication which have not yet been packaged, but all are
  316. ;; explicitly used from the 3rdparty folder during build.
  317. (build-system cmake-build-system)
  318. (arguments
  319. `(#:phases
  320. (modify-phases %standard-phases
  321. (add-after 'unpack 'delete-failing-tests
  322. ;; "Could not create autostart folder"
  323. (lambda _
  324. (substitute* "test/CMakeLists.txt"
  325. (("owncloud_add_test\\(Utility\\)" test)
  326. (string-append "#" test)))
  327. #t))
  328. (add-after 'unpack 'dont-embed-store-path
  329. (lambda _
  330. (substitute* "src/common/utility_unix.cpp"
  331. (("QCoreApplication::applicationFilePath\\()") "\"owncloud\""))
  332. #t))
  333. (delete 'patch-dot-desktop-files))
  334. #:configure-flags `("-DUNIT_TESTING=ON"
  335. ;; build without qtwebkit, which causes the
  336. ;; package to FTBFS while looking for QWebView.
  337. "-DNO_SHIBBOLETH=1"
  338. ;; Fix sync-exclude.list problem, see
  339. ;; <https://github.com/owncloud/client/issues/8373>
  340. ;; <https://issues.guix.gnu.org/47672>
  341. ,(string-append "-DSYSCONF_INSTALL_DIR="
  342. (assoc-ref %outputs "out")
  343. "/etc"))))
  344. (native-inputs
  345. `(("cmocka" ,cmocka)
  346. ("extra-cmake-modules" ,extra-cmake-modules)
  347. ("perl" ,perl)
  348. ("pkg-config" ,pkg-config)
  349. ("qtlinguist" ,qttools)))
  350. (inputs
  351. `(("qtbase" ,qtbase-5)
  352. ("qtkeychain" ,qtkeychain)
  353. ("sqlite" ,sqlite)
  354. ("zlib" ,zlib)))
  355. (home-page "https://owncloud.org")
  356. (synopsis "Folder synchronization with an ownCloud server")
  357. (description "The ownCloudSync system lets you always have your latest
  358. files wherever you are. Just specify one or more folders on the local machine
  359. to and a server to synchronize to. You can configure more computers to
  360. synchronize to the same server and any change to the files on one computer will
  361. silently and reliably flow across to every other.")
  362. (license license:gpl2+)))
  363. (define-public qsyncthingtray
  364. (package
  365. (name "qsyncthingtray")
  366. (version "0.5.8")
  367. (source
  368. (origin
  369. (method git-fetch)
  370. (uri (git-reference
  371. (url "https://github.com/sieren/QSyncthingTray")
  372. (commit version)))
  373. (file-name (git-file-name name version))
  374. (sha256
  375. (base32
  376. "1n9g4j7qznvg9zl6x163pi9f7wsc3x6q76i33psnm7x2v1i22x5w"))))
  377. (build-system cmake-build-system)
  378. (arguments
  379. `(#:configure-flags '("-DQST_BUILD_WEBKIT=1")
  380. #:phases
  381. (modify-phases %standard-phases
  382. ;; The program is meant to be run from the git repo or source tarball.
  383. (replace 'install
  384. (lambda* (#:key outputs #:allow-other-keys)
  385. (let* ((out (assoc-ref outputs "out"))
  386. (bin (string-append out "/bin")))
  387. (install-file "QSyncthingTray" bin)
  388. (mkdir-p (string-append out "/share/pixmaps"))
  389. (copy-file "../source/resources/images/Icon1024.png"
  390. (string-append
  391. out "/share/pixmaps/QSyncthingTray.png"))
  392. #t))))
  393. #:tests? #f)) ; no test target
  394. (inputs
  395. `(("qtbase" ,qtbase-5)
  396. ("qtwebkit" ,qtwebkit)))
  397. (home-page "https://github.com/sieren/QSyncthingTray")
  398. (synopsis "Traybar Application for Syncthing")
  399. (description
  400. "A traybar application for syncthing.
  401. @enumerate
  402. @item Shows number of connections at a glance.
  403. @item Traffic statistics about incoming, outgoing and total throughput.
  404. @item Launches Syncthing and Syncthing-iNotifier if specified.
  405. @item Quickly pause Syncthing with one click.
  406. @item Last Synced Files - Quickly see the recently synchronised files and open
  407. their folder.
  408. @item Quick Access to all shared folders.
  409. @item Presents Syncthing UI in a separate view instead of using the browser.
  410. @item Supports authenticated HTTPS connections.
  411. @item Uses System Notifications about current connection status.
  412. @item Toggle for monochrome icon.
  413. @end enumerate\n")
  414. (license license:lgpl3+)))
  415. (define-public lsyncd
  416. (package
  417. (name "lsyncd")
  418. (version "2.2.2")
  419. (source
  420. (origin
  421. (method git-fetch)
  422. (uri (git-reference
  423. (url "https://github.com/axkibe/lsyncd")
  424. (commit (string-append "release-" version))))
  425. (file-name (git-file-name name version))
  426. (sha256
  427. (base32 "1q2ixp52r96ckghgmxdbms6xrq8dbziimp8gmgzqfq4lk1v1w80y"))))
  428. (build-system cmake-build-system)
  429. (arguments
  430. `(;; The "tests" target is broken and assumes that tests are run in the
  431. ;; root directory.
  432. #:tests? #f
  433. #:test-target "tests"
  434. #:phases
  435. (modify-phases %standard-phases
  436. (add-after 'unpack 'search-$PATH-for-binaries
  437. ;; lsyncd requires and hard-codes absolute file names to binaries.
  438. ;; Make it fall back to searching $PATH for relative file names.
  439. (lambda _
  440. (substitute* "lsyncd.c"
  441. (("execv\\(") "execvp("))
  442. (substitute* (list "lsyncd.lua"
  443. "default-direct.lua"
  444. "default-rsync.lua"
  445. "default-rsyncssh.lua")
  446. (("(|/usr)/bin/") ""))
  447. #t))
  448. (replace 'install
  449. ;; No install target.
  450. (lambda* (#:key outputs #:allow-other-keys)
  451. (let* ((out (assoc-ref outputs "out"))
  452. (bin (string-append out "/bin"))
  453. (man (string-append out "/share/man/man1")))
  454. (install-file "lsyncd" bin)
  455. (install-file "../source/doc/manpage/lsyncd.1" man)
  456. #t))))))
  457. (native-inputs
  458. `(("lua" ,lua-5.2)))
  459. (home-page "https://github.com/axkibe/lsyncd")
  460. (synopsis "Synchronize local directories with remote targets")
  461. (description "Lsyncd watches a local directory trees event monitor
  462. interface (inotify or fsevents). It aggregates and combines events for a few
  463. seconds and then spawns one (or more) process(es) to synchronize the changes.
  464. By default this is rsync, which must be installed on all source and target
  465. machines. Lsyncd is thus a light-weight live mirror solution that is
  466. comparatively easy to install not requiring new file systems or block devices
  467. and does not hamper local file system performance.")
  468. (license license:gpl2+)))
  469. (define-public usync
  470. (let ((revision "1")
  471. (commit "09a8059a1adc22666d3ecf7872e22e6846c3ac9e"))
  472. (package
  473. (name "usync")
  474. (version (git-version "0" revision commit))
  475. (source
  476. (origin
  477. (method git-fetch)
  478. (uri (git-reference
  479. (url "https://github.com/ebzzry/usync")
  480. (commit commit)))
  481. (file-name (git-file-name name version))
  482. (sha256
  483. (base32 "16i1q8f0jmfd43rb8d70l2b383vr5ib4kh7iq3yd345q7xjz9c2j"))))
  484. (build-system copy-build-system)
  485. (inputs
  486. `(("scsh" ,scsh)))
  487. (propagated-inputs
  488. `(("rsync" ,rsync)
  489. ("unison" ,unison)))
  490. (arguments
  491. `(#:install-plan '(("usync" "bin/usync"))
  492. #:phases (modify-phases %standard-phases
  493. (add-before 'install 'patch-usync-shebang
  494. (lambda _
  495. (substitute* "usync"
  496. (("/usr/bin/env scsh")
  497. (which "scsh"))))))))
  498. (home-page "https://github.com/ebzzry/usync")
  499. (synopsis "Command line site-to-site synchronization tool")
  500. (description
  501. "@command{usync} is a simple site-to-site synchronization program
  502. written in @command{scsh}. It makes use of @command{unison} and
  503. @command{rsync} for bi- and uni-directional synchronizations.")
  504. (license license:expat))))
  505. (define-public casync
  506. (package
  507. (name "casync")
  508. (version "2")
  509. (home-page "https://github.com/systemd/casync/")
  510. (source (origin
  511. (method git-fetch)
  512. (uri (git-reference
  513. (url home-page)
  514. (commit (string-append "v" version))))
  515. (sha256
  516. (base32
  517. "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88"))
  518. (file-name (string-append name "-" version "-checkout"))
  519. (patches (search-patches "casync-renameat2-declaration.patch"))))
  520. (build-system meson-build-system)
  521. (native-inputs
  522. `(("pkg-config" ,pkg-config)
  523. ("python-sphinx" ,python-sphinx)
  524. ("rsync" ,rsync))) ;for tests
  525. (inputs
  526. `(("xz" ,xz) ;for liblzma
  527. ("zstd" ,zstd "lib")
  528. ("curl" ,curl)
  529. ("acl" ,acl)
  530. ("libselinux" ,libselinux)
  531. ("fuse" ,fuse)
  532. ("openssl" ,openssl)
  533. ("zlib" ,zlib)))
  534. (synopsis "File synchronization and backup system")
  535. (description
  536. "casync is a @dfn{content-addressable data synchronizer} that can be used
  537. as the basis of a backup system. It is:
  538. @itemize
  539. @item A combination of the rsync algorithm and content-addressable storage;
  540. @item An efficient way to store and retrieve multiple related versions of
  541. large file systems or directory trees;
  542. @item An efficient way to deliver and update OS, VM, IoT and container images
  543. over the Internet in an HTTP and CDN friendly way;
  544. @item An efficient backup system.
  545. @end itemize\n")
  546. (license license:lgpl2.1+)))
  547. (define-public rclone
  548. (package
  549. (name "rclone")
  550. (version "1.52.3")
  551. (source
  552. (origin
  553. (method url-fetch)
  554. (uri (string-append "https://github.com/rclone/rclone/releases/download/"
  555. "v" version "/rclone-v" version ".tar.gz"))
  556. (sha256
  557. (base32 "1pdhsxzc5ch2brfylghc602h9ba3x5dshxm3vcaldrgfac0rx0zl"))))
  558. ;; FIXME: Rclone bundles some libraries Guix already provides. Need to
  559. ;; un-bundle them.
  560. (build-system go-build-system)
  561. (arguments
  562. '(#:import-path "github.com/rclone/rclone"
  563. #:install-source? #f))
  564. (synopsis "@code{rsync} for cloud storage")
  565. (description "@code{Rclone} is a command line program to sync files and
  566. directories to and from different cloud storage providers.
  567. Features include:
  568. @itemize
  569. @item MD5/SHA1 hashes checked at all times for file integrity
  570. @item Timestamps preserved on files
  571. @item Partial syncs supported on a whole file basis
  572. @item Copy mode to just copy new/changed files
  573. @item Sync (one way) mode to make a directory identical
  574. @item Check mode to check for file hash equality
  575. @item Can sync to and from network, e.g., two different cloud accounts
  576. @item Optional encryption (Crypt)
  577. @item Optional cache (Cache)
  578. @item Optional FUSE mount (rclone mount)
  579. @end itemize")
  580. (home-page "https://rclone.org/")
  581. (license license:expat)))