gnu: sslh: Update to 1.21.
[jackhill/guix/guix.git] / gnu / packages / bittorrent.scm
CommitLineData
3963a729 1;;; GNU Guix --- Functional package management for GNU
df66fee7 2;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
07366434 3;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
55fe9abd 4;;; Copyright © 2016, 2017, 2018, 2019 Leo Famulari <leo@famulari.name>
7b6a8e23 5;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
4b67098d 6;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
dbd0b46d 7;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4e58e9d0 8;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
f8fbe376 9;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
39da44c2 10;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
8322ecb0 11;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
4b3ff362 12;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
3963a729
LC
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages bittorrent)
30 #:use-module (guix packages)
31 #:use-module (guix download)
e906f4e1 32 #:use-module (guix git-download)
3963a729 33 #:use-module (guix build-system gnu)
feb767b2 34 #:use-module (guix build-system python)
4cdec09a 35 #:use-module (guix build-system glib-or-gtk)
b5b73a82 36 #:use-module ((guix licenses) #:prefix l:)
3c569804 37 #:use-module (gnu packages)
f66842dc 38 #:use-module (gnu packages adns)
4e58e9d0 39 #:use-module (gnu packages boost)
f66842dc
EF
40 #:use-module (gnu packages check)
41 #:use-module (gnu packages compression)
4b67098d 42 #:use-module (gnu packages crypto)
3963a729 43 #:use-module (gnu packages curl)
f66842dc 44 #:use-module (gnu packages cyrus-sasl)
c2be790f 45 #:use-module (gnu packages freedesktop)
3963a729 46 #:use-module (gnu packages glib)
4b67098d
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gnupg)
49 #:use-module (gnu packages gstreamer)
df66fee7 50 #:use-module (gnu packages gtk)
f66842dc 51 #:use-module (gnu packages libevent)
f66842dc
EF
52 #:use-module (gnu packages multiprecision)
53 #:use-module (gnu packages nettle)
2d8dc79c 54 #:use-module (gnu packages ncurses)
f66842dc 55 #:use-module (gnu packages pkg-config)
feb767b2 56 #:use-module (gnu packages python)
c2be790f 57 #:use-module (gnu packages python-crypto)
44d10b1f 58 #:use-module (gnu packages python-xyz)
f8fbe376 59 #:use-module (gnu packages qt)
cd0322a3 60 #:use-module (gnu packages sqlite)
f66842dc
EF
61 #:use-module (gnu packages ssh)
62 #:use-module (gnu packages tls)
63 #:use-module (gnu packages xml))
3963a729
LC
64
65(define-public transmission
66 (package
67 (name "transmission")
0aa23e02 68 (version "2.94")
3963a729
LC
69 (source (origin
70 (method url-fetch)
71 (uri (string-append
547c4bd2
LF
72 "https://github.com/transmission/transmission-releases/raw/"
73 "master/transmission-" version ".tar.xz"))
0d796201 74 (patches (search-patches "transmission-CVE-2018-10756.patch"))
3963a729
LC
75 (sha256
76 (base32
0aa23e02 77 "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m"))))
4cdec09a 78 (build-system glib-or-gtk-build-system)
3963a729
LC
79 (outputs '("out" ; library and command-line interface
80 "gui")) ; graphical user interface
81 (arguments
4cdec09a 82 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
dc1d3cde
KK
83 #:phases
84 (modify-phases %standard-phases
85 (add-after 'install 'move-gui
86 (lambda* (#:key outputs #:allow-other-keys)
87 ;; Move the GUI to its own output, so that "out" doesn't
88 ;; depend on GTK+.
89 (let ((out (assoc-ref outputs "out"))
90 (gui (assoc-ref outputs "gui")))
91 (mkdir-p (string-append gui "/bin"))
92 (rename-file (string-append out "/bin/transmission-gtk")
93 (string-append gui
94 "/bin/transmission-gtk"))
07366434 95
bf155ce3 96 ;; Move the '.desktop' and icon files as well.
dc1d3cde 97 (mkdir (string-append gui "/share"))
bf155ce3
PN
98 (for-each
99 (lambda (dir)
100 (rename-file (string-append out "/share/" dir)
101 (string-append gui "/share/" dir)))
102 '("applications" "icons" "pixmaps")))
dc1d3cde 103 #t)))))
3963a729 104 (inputs
559491ea 105 `(("libevent" ,libevent)
3963a729
LC
106 ("curl" ,curl)
107 ("openssl" ,openssl)
3963a729
LC
108 ("zlib" ,zlib)
109 ("gtk+" ,gtk+)))
110 (native-inputs
111 `(("intltool" ,intltool)
112 ("pkg-config" ,pkg-config)))
c4cfa9c6 113 (home-page "https://transmissionbt.com/")
3963a729
LC
114 (synopsis "Fast and easy BitTorrent client")
115 (description
116 "Transmission is a BitTorrent client that comes with graphical,
117textual, and Web user interfaces. Transmission also has a daemon for
e881752c 118unattended operations. It supports local peer discovery, full encryption,
3963a729
LC
119DHT, µTP, PEX and Magnet Links.")
120
121 ;; COPYING reads:
122 ;;
123 ;; Transmission can be redistributed and/or modified under the terms of
124 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
125 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
126 ;; or any future license endorsed by Mnemosyne LLC.
127 ;;
128 ;; A few files files carry an MIT/X11 license header.
559491ea 129 (license (list l:gpl2 l:gpl3))))
df66fee7
LC
130
131(define-public libtorrent
132 (package
133 (name "libtorrent")
9e171634 134 (version "0.13.8")
df66fee7
LC
135 (source (origin
136 (method url-fetch)
137 (uri (string-append
29b4c57b 138 "http://rtorrent.net/downloads/libtorrent-"
df66fee7
LC
139 version ".tar.gz"))
140 (sha256
141 (base32
9e171634 142 "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd"))))
df66fee7
LC
143 (build-system gnu-build-system)
144 (inputs `(("openssl" ,openssl)
145 ("zlib" ,zlib)))
146 (native-inputs `(("pkg-config" ,pkg-config)
29b4c57b 147 ("cppunit" ,cppunit)))
df66fee7
LC
148 (synopsis "BitTorrent library of rtorrent")
149 (description
150 "LibTorrent is a BitTorrent library used by and developed in parallel
151with the BitTorrent client rtorrent. It is written in C++ with emphasis on
152speed and efficiency.")
9db04bf5 153 (home-page "https://github.com/rakshasa/libtorrent")
df66fee7 154 (license l:gpl2+)))
2d8dc79c
TUBK
155
156(define-public rtorrent
157 (package
158 (name "rtorrent")
0cbec2aa 159 (version "0.9.8")
2d8dc79c
TUBK
160 (source (origin
161 (method url-fetch)
162 (uri (string-append
9fbd458b 163 "http://rtorrent.net/downloads/rtorrent-"
2d8dc79c
TUBK
164 version ".tar.gz"))
165 (sha256
166 (base32
0cbec2aa 167 "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy"))))
2d8dc79c
TUBK
168 (build-system gnu-build-system)
169 (inputs `(("libtorrent" ,libtorrent)
170 ("ncurses" ,ncurses)
171 ("curl" ,curl)
172 ("cyrus-sasl" ,cyrus-sasl)
173 ("openssl" ,openssl)
174 ("zlib" ,zlib)))
175 (native-inputs `(("pkg-config" ,pkg-config)
176 ("cppunit" ,cppunit)))
177 (synopsis "BitTorrent client with ncurses interface")
178 (description
179 "rTorrent is a BitTorrent client with an ncurses interface. It supports
180full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
181XML-RPC over SCGI.")
9db04bf5 182 (home-page "https://github.com/rakshasa/rtorrent")
2d8dc79c 183 (license l:gpl2+)))
e906f4e1
LF
184
185(define-public tremc
55fe9abd
LF
186 (let ((commit "4d50dab7376601daca13f7be6eabc0eaa057c1b0")
187 (revision "0"))
188 (package
189 (name "tremc")
190 (version (git-version "0.9.1" revision commit))
191 (source
192 (origin
193 (method git-fetch)
194 (uri (git-reference
b0e7b699 195 (url "https://github.com/tremc/tremc")
55fe9abd
LF
196 (commit commit)))
197 (file-name (git-file-name name version))
198 (sha256
199 (base32
200 "0qpi65n8rv7l9mg8qyqx70z83inkl8v5r5nks65c99lhscdki0w7"))))
201 (build-system gnu-build-system)
202 (arguments
203 `(#:tests? #f ; no test suite
204 #:make-flags
205 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
206 #:phases
207 (modify-phases %standard-phases
208 ;; The software is just a Python script that must be copied into place.
209 (delete 'configure)
210 (delete 'build))))
211 (inputs
212 `(("python" ,python)))
213 (synopsis "Console client for the Transmission BitTorrent daemon")
214 (description "Tremc is a console client, with a curses interface, for the
e906f4e1 215Transmission BitTorrent daemon.")
55fe9abd
LF
216 (home-page "https://github.com/tremc/tremc")
217 (license l:gpl3+))))
feb767b2
LF
218
219(define-public transmission-remote-cli
220 (package
221 (name "transmission-remote-cli")
222 (version "1.7.1")
223 (source (origin
8322ecb0
RW
224 (method git-fetch)
225 (uri (git-reference
b0e7b699 226 (url "https://github.com/fagga/transmission-remote-cli")
8322ecb0
RW
227 (commit (string-append "v" version))))
228 (file-name (git-file-name name version))
feb767b2
LF
229 (sha256
230 (base32
8322ecb0 231 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
feb767b2
LF
232 (build-system python-build-system)
233 (arguments
234 `(#:python ,python-2 ; only supports Python 2
235 #:tests? #f ; no test suite
236 #:phases (modify-phases %standard-phases
237 ;; The software is just a Python script that must be
238 ;; copied into place.
239 (delete 'build)
240 (replace 'install
241 (lambda* (#:key outputs #:allow-other-keys)
242 (let* ((out (assoc-ref outputs "out"))
243 (bin (string-append out "/bin"))
244 (man (string-append out "/share/man/man1"))
245 ;; FIXME install zsh completions
246 (completions (string-append out "/etc/bash_completion.d")))
247 (install-file "transmission-remote-cli" bin)
248 (install-file "transmission-remote-cli.1" man)
249 (install-file
250 (string-append
251 "completion/bash/"
252 "transmission-remote-cli-bash-completion.sh")
253 completions)))))))
254 (synopsis "Console client for the Transmission BitTorrent daemon")
255 (description "Transmission-remote-cli is a console client, with a curses
aaf111a2
LF
256interface, for the Transmission BitTorrent daemon. This package is no longer
257maintained upstream.")
feb767b2 258 (home-page "https://github.com/fagga/transmission-remote-cli")
aaf111a2
LF
259 (license l:gpl3+)
260 (properties `((superseded . ,tremc)))))
f66842dc
EF
261
262(define-public aria2
263 (package
264 (name "aria2")
7b6a8e23 265 (version "1.35.0")
f66842dc
EF
266 (source (origin
267 (method url-fetch)
7b6a8e23
EF
268 (uri (string-append "https://github.com/aria2/aria2/releases/"
269 "download/release-" version
270 "/aria2-" version ".tar.xz"))
f66842dc
EF
271 (sha256
272 (base32
7b6a8e23 273 "1zbxc517d97lb96f15xcy4l7b66grxrp3h2ids2jiwkaip87yaqy"))))
f66842dc
EF
274 (build-system gnu-build-system)
275 (arguments
d2a7a145
EF
276 `(#:configure-flags (list "--enable-libaria2"
277 (string-append "--with-bashcompletiondir="
278 %output "/etc/bash_completion.d/"))
f66842dc
EF
279 #:phases
280 (modify-phases %standard-phases
281 (add-after 'unpack 'delete-socket-tests
282 (lambda _
283 (substitute* "test/LpdMessageDispatcherTest.cc"
284 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
285 (string-append "// " text)))
286 (substitute* "test/LpdMessageReceiverTest.cc"
287 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
9c64f76e
EF
288 (string-append "// " text)))
289 #t)))))
f66842dc 290 (native-inputs
5bed95ef
EF
291 `(("cppunit" ,cppunit) ; for the tests
292 ("pkg-config" ,pkg-config)))
f66842dc
EF
293 (inputs
294 `(("c-ares" ,c-ares)
f66842dc
EF
295 ("gnutls" ,gnutls)
296 ("gmp" ,gmp)
297 ("libssh2" ,libssh2)
298 ("libxml2" ,libxml2)
299 ("nettle" ,nettle)
300 ("sqlite" ,sqlite)
301 ("zlib" ,zlib)))
5bed95ef 302 (home-page "https://aria2.github.io/")
f66842dc
EF
303 (synopsis "Utility for parallel downloading files")
304 (description
305 "Aria2 is a lightweight, multi-protocol & multi-source command-line
306download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
307Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
308 (license l:gpl2+)))
4b67098d 309
4b67098d
310(define-public uget
311 (package
312 (name "uget")
b2d35dd9
NG
313 (version "2.2.0")
314 (source
315 (origin
316 (method url-fetch)
317 (uri (string-append "mirror://sourceforge/urlget/"
318 "uget%20%28stable%29/" version "/uget-"
319 version ".tar.gz"))
320 (sha256
321 (base32 "0rg2mr2cndxvnjib8zm5dp7y2hgbvnqkz2j2jmg0xlzfh9d34b2m"))))
4b67098d 322 (build-system gnu-build-system)
4b67098d
323 (inputs
324 `(("curl" ,curl)
325 ("gtk+" ,gtk+)
326 ("glib" ,glib)
327 ("gnutls" ,gnutls)
328 ("gstreamer" ,gstreamer)
329 ("libgcrypt" ,libgcrypt)
330 ("libnotify" ,libnotify)
331 ("openssl" ,openssl)))
332 (native-inputs
c7ad32d9
EF
333 `(("intltool" ,intltool)
334 ("pkg-config" ,pkg-config)))
950f1697 335 (home-page "https://ugetdm.com/")
4b67098d
336 (synopsis "Universal download manager with GTK+ interface")
337 (description
338 "uGet is portable download manager with GTK+ interface supporting
339HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
340downloads, download scheduling, download rate limiting.")
341 (license l:lgpl2.1+)))
8975d00c
TGR
342
343(define-public mktorrent
344 (package
345 (name "mktorrent")
fd90e396 346 (version "1.1")
8975d00c 347 (source (origin
4342a046
RW
348 (method git-fetch)
349 (uri (git-reference
b0e7b699 350 (url "https://github.com/Rudde/mktorrent")
4342a046
RW
351 (commit (string-append "v" version))))
352 (file-name (git-file-name name version))
8975d00c
TGR
353 (sha256
354 (base32
4342a046 355 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
8975d00c
TGR
356 (build-system gnu-build-system)
357 (arguments
358 `(#:phases (modify-phases %standard-phases
359 (delete 'configure)) ; no configure script
360 #:make-flags (list "CC=gcc"
361 (string-append "PREFIX=" (assoc-ref %outputs "out"))
362 "NO_HASH_CHECK=1"
363 "USE_LARGE_FILES=1"
364 "USE_LONG_OPTIONS=1"
365 "USE_PTHREADS=1")
366 #:tests? #f)) ; no tests
fd90e396 367 (home-page "https://github.com/Rudde/mktorrent")
8975d00c 368 (synopsis "Utility to create BitTorrent metainfo files")
897bd0b5
TGR
369 (description
370 "mktorrent is a simple command-line utility to create BitTorrent
371@dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
372files and whole directories. It can add multiple trackers and web seed URLs,
373and set the @code{private} flag to disallow advertisement through the
374distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
8975d00c
TGR
375and will take advantage of multiple processor cores where possible.")
376 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
377 l:gpl2+)))) ; with permission to link with OpenSSL
4e58e9d0
JL
378
379(define-public libtorrent-rasterbar
380 (package
381 (name "libtorrent-rasterbar")
9a232125 382 (version "1.1.14")
4e58e9d0
JL
383 (source (origin
384 (method url-fetch)
385 (uri
386 (string-append
3fde051b 387 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
3c569804
MB
388 (string-join (string-split version #\.) "_")
389 "/libtorrent-rasterbar-" version ".tar.gz"))
4e58e9d0
JL
390 (sha256
391 (base32
9a232125 392 "0sn3ingmk1lk9p56f9ifgdwhjg0qizcfgv15wyc9s71nm5fya7sc"))))
4e58e9d0
JL
393 (build-system gnu-build-system)
394 (arguments
395 `(#:configure-flags
396 (list (string-append "--with-boost-libdir="
397 (assoc-ref %build-inputs "boost")
398 "/lib")
399 "--enable-python-binding"
7960bb27 400 "--enable-tests")
4e58e9d0
JL
401 #:make-flags (list
402 (string-append "LDFLAGS=-Wl,-rpath="
0fe041bd 403 (assoc-ref %outputs "out") "/lib"))))
4e58e9d0
JL
404 (inputs `(("boost" ,boost)
405 ("openssl" ,openssl)))
e22c2c78 406 (native-inputs `(("python" ,python-wrapper)
4e58e9d0 407 ("pkg-config" ,pkg-config)))
9270b2fb 408 (home-page "https://www.libtorrent.org/")
4e58e9d0
JL
409 (synopsis "Feature complete BitTorrent implementation")
410 (description
411 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
412focusing on efficiency and scalability. It runs on embedded devices as well as
413desktops.")
414 (license l:bsd-2)))
415
f8fbe376
FT
416(define-public qbittorrent
417 (package
418 (name "qbittorrent")
dce70d0e 419 (version "4.2.5")
0748a7b2
TGR
420 (source
421 (origin
422 (method git-fetch)
423 (uri (git-reference
b0e7b699 424 (url "https://github.com/qbittorrent/qBittorrent")
0748a7b2
TGR
425 (commit (string-append "release-" version))))
426 (file-name (git-file-name name version))
427 (sha256
dce70d0e 428 (base32 "1n613ylg6i9gisgk0dbr2kpfasyizrkdjff1r8smd4vri2qrdksn"))))
f8fbe376
FT
429 (build-system gnu-build-system)
430 (arguments
431 `(#:configure-flags
432 (list (string-append "--with-boost-libdir="
433 (assoc-ref %build-inputs "boost")
434 "/lib")
435 "--enable-debug"
aaa88937
GLV
436 "QMAKE_LRELEASE=lrelease")
437 #:modules ((guix build gnu-build-system)
438 (guix build qt-utils)
439 (guix build utils))
440 #:imported-modules (,@%gnu-build-system-modules
441 (guix build qt-utils))
442 #:phases
443 (modify-phases %standard-phases
444 (add-after 'install 'wrap-qt
445 (lambda* (#:key outputs #:allow-other-keys)
446 (wrap-qt-program (assoc-ref outputs "out") "qbittorrent")
447 #t)))))
f8fbe376
FT
448 (native-inputs
449 `(("pkg-config" ,pkg-config)
450 ("qttools" ,qttools)))
451 (inputs
452 `(("boost" ,boost)
453 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
454 ("openssl" ,openssl)
ea236462 455 ("python" ,python-wrapper)
f8fbe376
FT
456 ("qtbase" ,qtbase)
457 ("qtsvg" ,qtsvg)
458 ("zlib" ,zlib)))
459 (home-page "https://www.qbittorrent.org/")
460 (synopsis "Graphical BitTorrent client")
461 (description
462 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
463libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
4e58e9d0 464
f8fbe376
FT
465It aims to be a good alternative to all other BitTorrent clients out there.
466qBittorrent is fast, stable and provides unicode support as well as many
467features.")
468 (license l:gpl2+)))
c2be790f
NN
469
470(define-public deluge
471 (package
472 (name "deluge")
473 (version "1.3.15")
474 (source
475 (origin
476 (method url-fetch)
477 (uri (string-append
478 "http://download.deluge-torrent.org/source/deluge-"
479 version ".tar.xz"))
480 (sha256
481 (base32
482 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
483 (build-system python-build-system)
484 (inputs
485 `(("libtorrent" ,libtorrent-rasterbar)
486 ("python2-chardet" ,python2-chardet)
487 ("python2-pygtk" ,python2-pygtk)
488 ("python2-pyopenssl" ,python2-pyopenssl)
489 ("python2-pyxdg" ,python2-pyxdg)
490 ("python2-service-identity" ,python2-service-identity)
491 ("python2-twisted" ,python2-twisted)))
492 (native-inputs
493 `(("intltool" ,intltool)))
494 (arguments
495 `(#:python ,python-2))
496 (home-page "https://www.deluge-torrent.org/")
497 (synopsis "Fully-featured cross-platform ​BitTorrent client")
498 (description
499 "Deluge contains the common features to BitTorrent clients such as
500Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
501(PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
502speed limits. Deluge heavily utilises the ​libtorrent library. It is
503designed to run as both a normal standalone desktop application and as a
504​client-server.")
505 (license l:gpl3+)))