Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / bittorrent.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>
3 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017, 2018, 2019 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
7 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
9 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
10 ;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
11 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages bittorrent)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix build-system gnu)
33 #:use-module (guix build-system python)
34 #:use-module (guix build-system glib-or-gtk)
35 #:use-module ((guix licenses) #:prefix l:)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages adns)
38 #:use-module (gnu packages boost)
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages crypto)
42 #:use-module (gnu packages curl)
43 #:use-module (gnu packages cyrus-sasl)
44 #:use-module (gnu packages file)
45 #:use-module (gnu packages freedesktop)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gnupg)
49 #:use-module (gnu packages gstreamer)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages libevent)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages nettle)
55 #:use-module (gnu packages ncurses)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-crypto)
59 #:use-module (gnu packages python-xyz)
60 #:use-module (gnu packages qt)
61 #:use-module (gnu packages sqlite)
62 #:use-module (gnu packages ssh)
63 #:use-module (gnu packages tls)
64 #:use-module (gnu packages xml))
65
66 (define-public transmission
67 (package
68 (name "transmission")
69 (version "2.94")
70 (source (origin
71 (method url-fetch)
72 (uri (string-append
73 "https://github.com/transmission/transmission-releases/raw/"
74 "master/transmission-" version ".tar.xz"))
75 (sha256
76 (base32
77 "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m"))))
78 (build-system glib-or-gtk-build-system)
79 (outputs '("out" ; library and command-line interface
80 "gui")) ; graphical user interface
81 (arguments
82 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
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"))
95
96 ;; Move the '.desktop' file as well.
97 (mkdir (string-append gui "/share"))
98 (rename-file (string-append out "/share/applications")
99 (string-append gui "/share/applications")))
100 #t)))))
101 (inputs
102 `(("inotify-tools" ,inotify-tools)
103 ("libevent" ,libevent)
104 ("curl" ,curl)
105 ("cyrus-sasl" ,cyrus-sasl)
106 ("openssl" ,openssl)
107 ("file" ,file)
108 ("zlib" ,zlib)
109 ("gtk+" ,gtk+)))
110 (native-inputs
111 `(("intltool" ,intltool)
112 ("pkg-config" ,pkg-config)))
113 (home-page "http://www.transmissionbt.com/")
114 (synopsis "Fast and easy BitTorrent client")
115 (description
116 "Transmission is a BitTorrent client that comes with graphical,
117 textual, and Web user interfaces. Transmission also has a daemon for
118 unattended operations. It supports local peer discovery, full encryption,
119 DHT, µ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.
129 (license l:gpl3+)))
130
131 (define-public libtorrent
132 (package
133 (name "libtorrent")
134 (version "0.13.8")
135 (source (origin
136 (method url-fetch)
137 (uri (string-append
138 "http://rtorrent.net/downloads/libtorrent-"
139 version ".tar.gz"))
140 (sha256
141 (base32
142 "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd"))))
143 (build-system gnu-build-system)
144 (inputs `(("openssl" ,openssl)
145 ("zlib" ,zlib)))
146 (native-inputs `(("pkg-config" ,pkg-config)
147 ("cppunit" ,cppunit)))
148 (synopsis "BitTorrent library of rtorrent")
149 (description
150 "LibTorrent is a BitTorrent library used by and developed in parallel
151 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
152 speed and efficiency.")
153 (home-page "https://github.com/rakshasa/libtorrent")
154 (license l:gpl2+)))
155
156 (define-public rtorrent
157 (package
158 (name "rtorrent")
159 (version "0.9.8")
160 (source (origin
161 (method url-fetch)
162 (uri (string-append
163 "http://rtorrent.net/downloads/rtorrent-"
164 version ".tar.gz"))
165 (sha256
166 (base32
167 "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy"))))
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
180 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
181 XML-RPC over SCGI.")
182 (home-page "https://github.com/rakshasa/rtorrent")
183 (license l:gpl2+)))
184
185 (define-public tremc
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
195 (url "https://github.com/tremc/tremc.git")
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
215 Transmission BitTorrent daemon.")
216 (home-page "https://github.com/tremc/tremc")
217 (license l:gpl3+))))
218
219 (define-public transmission-remote-cli
220 (package
221 (name "transmission-remote-cli")
222 (version "1.7.1")
223 (source (origin
224 (method git-fetch)
225 (uri (git-reference
226 (url "https://github.com/fagga/transmission-remote-cli.git")
227 (commit (string-append "v" version))))
228 (file-name (git-file-name name version))
229 (sha256
230 (base32
231 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
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
256 interface, for the Transmission BitTorrent daemon. This package is no longer
257 maintained upstream.")
258 (home-page "https://github.com/fagga/transmission-remote-cli")
259 (license l:gpl3+)
260 (properties `((superseded . ,tremc)))))
261
262 (define-public aria2
263 (package
264 (name "aria2")
265 (version "1.34.0")
266 (source (origin
267 (method url-fetch)
268 (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
269 "releases/download/release-" version "/"
270 name "-" version ".tar.xz"))
271 (patches (search-patches "aria2-CVE-2019-3500.patch"))
272 (sha256
273 (base32
274 "18vpgr430vxlwbcc3598rr1srfmwypls6wp1m4wf21hncc1ahi1s"))))
275 (build-system gnu-build-system)
276 (arguments
277 `(#:configure-flags (list "--enable-libaria2"
278 (string-append "--with-bashcompletiondir="
279 %output "/etc/bash_completion.d/"))
280 #:phases
281 (modify-phases %standard-phases
282 (add-after 'unpack 'delete-socket-tests
283 (lambda _
284 (substitute* "test/LpdMessageDispatcherTest.cc"
285 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
286 (string-append "// " text)))
287 (substitute* "test/LpdMessageReceiverTest.cc"
288 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
289 (string-append "// " text)))
290 #t)))))
291 (native-inputs
292 `(("cppunit" ,cppunit) ; for the tests
293 ("pkg-config" ,pkg-config)))
294 (inputs
295 `(("c-ares" ,c-ares)
296 ("gnutls" ,gnutls)
297 ("gmp" ,gmp)
298 ("libssh2" ,libssh2)
299 ("libxml2" ,libxml2)
300 ("nettle" ,nettle)
301 ("sqlite" ,sqlite)
302 ("zlib" ,zlib)))
303 (home-page "https://aria2.github.io/")
304 (synopsis "Utility for parallel downloading files")
305 (description
306 "Aria2 is a lightweight, multi-protocol & multi-source command-line
307 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
308 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
309 (license l:gpl2+)))
310
311 (define-public uget
312 (package
313 (name "uget")
314 (version "2.0.8")
315 (source (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
322 "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
323 (build-system gnu-build-system)
324 (inputs
325 `(("curl" ,curl)
326 ("gtk+" ,gtk+)
327 ("glib" ,glib)
328 ("gnutls" ,gnutls)
329 ("gstreamer" ,gstreamer)
330 ("libgcrypt" ,libgcrypt)
331 ("libnotify" ,libnotify)
332 ("openssl" ,openssl)))
333 (native-inputs
334 `(("intltool" ,intltool)
335 ("pkg-config" ,pkg-config)))
336 (home-page "http://ugetdm.com/")
337 (synopsis "Universal download manager with GTK+ interface")
338 (description
339 "uGet is portable download manager with GTK+ interface supporting
340 HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
341 downloads, download scheduling, download rate limiting.")
342 (license l:lgpl2.1+)))
343
344 (define-public mktorrent
345 (package
346 (name "mktorrent")
347 (version "1.1")
348 (source (origin
349 (method git-fetch)
350 (uri (git-reference
351 (url "https://github.com/Rudde/mktorrent.git")
352 (commit (string-append "v" version))))
353 (file-name (git-file-name name version))
354 (sha256
355 (base32
356 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
357 (build-system gnu-build-system)
358 (arguments
359 `(#:phases (modify-phases %standard-phases
360 (delete 'configure)) ; no configure script
361 #:make-flags (list "CC=gcc"
362 (string-append "PREFIX=" (assoc-ref %outputs "out"))
363 "NO_HASH_CHECK=1"
364 "USE_LARGE_FILES=1"
365 "USE_LONG_OPTIONS=1"
366 "USE_PTHREADS=1")
367 #:tests? #f)) ; no tests
368 (home-page "https://github.com/Rudde/mktorrent")
369 (synopsis "Utility to create BitTorrent metainfo files")
370 (description
371 "mktorrent is a simple command-line utility to create BitTorrent
372 @dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
373 files and whole directories. It can add multiple trackers and web seed URLs,
374 and set the @code{private} flag to disallow advertisement through the
375 distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
376 and will take advantage of multiple processor cores where possible.")
377 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
378 l:gpl2+)))) ; with permission to link with OpenSSL
379
380 (define-public libtorrent-rasterbar
381 (package
382 (name "libtorrent-rasterbar")
383 (version "1.1.13")
384 (source (origin
385 (method url-fetch)
386 (uri
387 (string-append
388 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
389 (string-join (string-split version #\.) "_")
390 "/libtorrent-rasterbar-" version ".tar.gz"))
391 (sha256
392 (base32
393 "1mza92ljjqvlz9582pmls3n45srqhxvw3q348xihcg4fhlchf11h"))))
394 (build-system gnu-build-system)
395 (arguments
396 `(#:configure-flags
397 (list (string-append "--with-boost-libdir="
398 (assoc-ref %build-inputs "boost")
399 "/lib")
400 "--enable-python-binding"
401 "--enable-tests")
402 #:make-flags (list
403 (string-append "LDFLAGS=-Wl,-rpath="
404 (assoc-ref %outputs "out") "/lib"))
405 #:phases (modify-phases %standard-phases
406 (add-after 'unpack 'compile-python-c++11
407 (lambda _
408 ;; Make sure the Python bindings are compiled in C++ mode to
409 ;; avoid undefined references as mentioned in
410 ;; <https://github.com/qbittorrent/qBittorrent/issues/638>.
411 ;; XXX: This can be removed for 1.2+.
412 (substitute* "bindings/python/setup.py"
413 (("\\+ target_specific\\(\\)\\,")
414 "+ target_specific() + ['-std=c++11'],"))
415 #t)))))
416 (inputs `(("boost" ,boost)
417 ("openssl" ,openssl)))
418 (native-inputs `(("python" ,python-2)
419 ("pkg-config" ,pkg-config)))
420 (home-page "https://www.libtorrent.org/")
421 (synopsis "Feature complete BitTorrent implementation")
422 (description
423 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
424 focusing on efficiency and scalability. It runs on embedded devices as well as
425 desktops.")
426 (license l:bsd-2)))
427
428 (define-public qbittorrent
429 (package
430 (name "qbittorrent")
431 (version "4.1.6")
432 (source
433 (origin
434 (method git-fetch)
435 (uri (git-reference
436 (url "https://github.com/qbittorrent/qBittorrent.git")
437 (commit (string-append "release-" version))))
438 (file-name (git-file-name name version))
439 (sha256
440 (base32 "1y9kv84sy5fg64wbl4xpm8qh0hjba7ibk045cazp0m736rjmxk8c"))))
441 (build-system gnu-build-system)
442 (arguments
443 `(#:configure-flags
444 (list (string-append "--with-boost-libdir="
445 (assoc-ref %build-inputs "boost")
446 "/lib")
447 "--enable-debug"
448 "QMAKE_LRELEASE=lrelease")))
449 (native-inputs
450 `(("pkg-config" ,pkg-config)
451 ("qttools" ,qttools)))
452 (inputs
453 `(("boost" ,boost)
454 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
455 ("openssl" ,openssl)
456 ("python" ,python-wrapper)
457 ("qtbase" ,qtbase)
458 ("qtsvg" ,qtsvg)
459 ("zlib" ,zlib)))
460 (home-page "https://www.qbittorrent.org/")
461 (synopsis "Graphical BitTorrent client")
462 (description
463 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
464 libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
465
466 It aims to be a good alternative to all other BitTorrent clients out there.
467 qBittorrent is fast, stable and provides unicode support as well as many
468 features.")
469 (license l:gpl2+)))
470
471 (define-public deluge
472 (package
473 (name "deluge")
474 (version "1.3.15")
475 (source
476 (origin
477 (method url-fetch)
478 (uri (string-append
479 "http://download.deluge-torrent.org/source/deluge-"
480 version ".tar.xz"))
481 (sha256
482 (base32
483 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
484 (build-system python-build-system)
485 (inputs
486 `(("libtorrent" ,libtorrent-rasterbar)
487 ("python2-chardet" ,python2-chardet)
488 ("python2-pygtk" ,python2-pygtk)
489 ("python2-pyopenssl" ,python2-pyopenssl)
490 ("python2-pyxdg" ,python2-pyxdg)
491 ("python2-service-identity" ,python2-service-identity)
492 ("python2-twisted" ,python2-twisted)))
493 (native-inputs
494 `(("intltool" ,intltool)))
495 (arguments
496 `(#:python ,python-2))
497 (home-page "https://www.deluge-torrent.org/")
498 (synopsis "Fully-featured cross-platform ​BitTorrent client")
499 (description
500 "Deluge contains the common features to BitTorrent clients such as
501 Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
502 (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
503 speed limits. Deluge heavily utilises the ​libtorrent library. It is
504 designed to run as both a normal standalone desktop application and as a
505 ​client-server.")
506 (license l:gpl3+)))