projects/guix·blob ruby-team · refs

152 lines · 5.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012, 2013 Andreas Enge <[email protected]>
3;;; Copyright © 2016 Mark H Weaver <[email protected]>
4;;; Copyright © 2017, 2019 Efraim Flashner <[email protected]>
5;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2019, 2021 Leo Famulari <[email protected]>
7;;; Copyright © 2020 Vincent Legoll <[email protected]>
8;;; Copyright © 2026 Ian Eure <[email protected]>
9;;; Copyright © 2026 Ashish SHUKLA <[email protected]>
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
26(define-module (gnu packages rsync)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages acl)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages digest)
32 #:use-module (gnu packages perl)
33 #:use-module (gnu packages python)
34 #:use-module (gnu packages popt)
35 #:use-module (gnu packages tls)
36 #:use-module ((guix licenses) #:prefix license:)
37 #:use-module (guix packages)
38 #:use-module (guix download)
39 #:use-module (guix gexp)
40 #:use-module (guix git-download)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix utils))
44
45(define-public rsync
46 (package
47 (name "rsync")
48 (version "3.4.4")
49 (source (origin
50 (method url-fetch)
51 (uri (string-append "https://rsync.samba.org/ftp/rsync/src/rsync-"
52 version ".tar.gz"))
53 (sha256
54 (base32
55 "15psv1vphxlin3sdhn0p1pw90p3w80v928pv2his6gb5za1cz25x"))))
56 (build-system gnu-build-system)
57 (arguments
58 `(#:configure-flags
59 ;; The bundled copies are preferred by default.
60 (list "--without-included-zlib"
61 "--without-included-popt")))
62 (native-inputs
63 (list perl python-minimal)) ;needed for tests
64 (inputs
65 (list acl
66 lz4
67 openssl
68 popt
69 xxhash
70 zlib
71 `(,zstd "lib")))
72 (synopsis "Remote (and local) file copying tool")
73 (description
74 "Rsync is a fast and versatile file copying tool. It can copy locally,
75to/from another host over any remote shell, or to/from a remote rsync daemon.
76Its delta-transfer algorithm reduces the amount of data sent over the network
77by sending only the differences between the source files and the existing
78files in the destination.")
79 (license license:gpl3+)
80 (home-page "https://rsync.samba.org/")))
81
82(define-public librsync
83 (package
84 (name "librsync")
85 (version "2.3.4")
86 (source (origin
87 (method git-fetch)
88 (uri (git-reference
89 (url "https://github.com/librsync/librsync")
90 (commit (string-append "v" version))))
91 (file-name (git-file-name name version))
92 (sha256
93 (base32
94 "07yd45r9fkgw55m47xh2aqgflagzw5kh2w764w5gv1jfrg5rn8vy"))))
95 (build-system cmake-build-system)
96 (inputs
97 (list popt))
98 (native-inputs
99 (list which perl))
100 (home-page "https://librsync.sourceforge.net/")
101 (synopsis "Implementation of the rsync remote-delta algorithm")
102 (description
103 "Librsync is a free software library that implements the rsync
104remote-delta algorithm. This algorithm allows efficient remote updates of a
105file, without requiring the old and new versions to both be present at the
106sending end. The library uses a \"streaming\" design similar to that of zlib
107with the aim of allowing it to be embedded into many different applications.")
108 (license license:lgpl2.1+)))
109
110(define-public openrsync
111 (let ((base-version "0.5.0")
112 (revision "0")
113 (commit "a257c0f495af2b5ee6b41efc6724850a445f87ed"))
114 (package
115 (name "openrsync")
116 (version (git-version base-version revision commit))
117 (source
118 (origin
119 (method git-fetch)
120 (uri (git-reference
121 (url "https://github.com/kristapsdz/openrsync/")
122 (commit commit)))
123 (file-name (git-file-name name version))
124 (sha256
125 (base32 "1jfz10psi1qw842hwip7p01sgd4ns9n53amdshzqy5brqyinbkd5"))))
126 (build-system gnu-build-system)
127 (arguments
128 (list
129 #:tests? #f ;No tests.
130 #:phases
131 #~(modify-phases %standard-phases
132 (add-after 'unpack 'patch-hurd
133 (lambda _
134 (substitute* "configure"
135 (("defined\\(__linux__\\)" all)
136 (string-append all "|| defined(__GNU__)")))))
137 (replace 'configure
138 ;; openrsync has a non-autotools ./configure script which
139 ;; errors under the gnu-build-system's 'configure phase.
140 (lambda _
141 (setenv "DESTDIR" #$output)
142 (setenv "PREFIX" "")
143 (setenv "CFLAGS" "-O2")
144 (setenv "CC" #$(cc-for-target))
145 (invoke "./configure" "PREFIX=\"\""))))))
146 (synopsis "OpenBSD implementation of @command{rsync}")
147 (description
148 "Openrsync is an alternate implementation of @command{rsync},
149originally written for OpenBSD and ported to Linux and other Unix-like
150systems. It supports a subset of @command{rsync}'s options.")
151 (license license:isc)
152 (home-page "https://github.com/kristapsdz/openrsync"))))