Merge branch 'master' into staging
[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, 2019 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
7 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
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)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system python)
35 #:use-module (guix build-system glib-or-gtk)
36 #:use-module ((guix licenses) #:prefix l:)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages adns)
39 #:use-module (gnu packages boost)
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 cyrus-sasl)
45 #:use-module (gnu packages file)
46 #:use-module (gnu packages freedesktop)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages gnupg)
50 #:use-module (gnu packages gstreamer)
51 #:use-module (gnu packages gtk)
52 #:use-module (gnu packages libevent)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages multiprecision)
55 #:use-module (gnu packages nettle)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages python-crypto)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages qt)
62 #:use-module (gnu packages sqlite)
63 #:use-module (gnu packages ssh)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages xml))
66
67 (define-public transmission
68 (package
69 (name "transmission")
70 (version "2.94")
71 (source (origin
72 (method url-fetch)
73 (uri (string-append
74 "https://github.com/transmission/transmission-releases/raw/"
75 "master/transmission-" version ".tar.xz"))
76 (sha256
77 (base32
78 "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m"))))
79 (build-system glib-or-gtk-build-system)
80 (outputs '("out" ; library and command-line interface
81 "gui")) ; graphical user interface
82 (arguments
83 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
84 #:phases
85 (modify-phases %standard-phases
86 (add-after 'install 'move-gui
87 (lambda* (#:key outputs #:allow-other-keys)
88 ;; Move the GUI to its own output, so that "out" doesn't
89 ;; depend on GTK+.
90 (let ((out (assoc-ref outputs "out"))
91 (gui (assoc-ref outputs "gui")))
92 (mkdir-p (string-append gui "/bin"))
93 (rename-file (string-append out "/bin/transmission-gtk")
94 (string-append gui
95 "/bin/transmission-gtk"))
96
97 ;; Move the '.desktop' file as well.
98 (mkdir (string-append gui "/share"))
99 (rename-file (string-append out "/share/applications")
100 (string-append gui "/share/applications")))
101 #t)))))
102 (inputs
103 `(("inotify-tools" ,inotify-tools)
104 ("libevent" ,libevent)
105 ("curl" ,curl)
106 ("cyrus-sasl" ,cyrus-sasl)
107 ("openssl" ,openssl)
108 ("file" ,file)
109 ("zlib" ,zlib)
110 ("gtk+" ,gtk+)))
111 (native-inputs
112 `(("intltool" ,intltool)
113 ("pkg-config" ,pkg-config)))
114 (home-page "https://transmissionbt.com/")
115 (synopsis "Fast and easy BitTorrent client")
116 (description
117 "Transmission is a BitTorrent client that comes with graphical,
118 textual, and Web user interfaces. Transmission also has a daemon for
119 unattended operations. It supports local peer discovery, full encryption,
120 DHT, µTP, PEX and Magnet Links.")
121
122 ;; COPYING reads:
123 ;;
124 ;; Transmission can be redistributed and/or modified under the terms of
125 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
126 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
127 ;; or any future license endorsed by Mnemosyne LLC.
128 ;;
129 ;; A few files files carry an MIT/X11 license header.
130 (license l:gpl3+)))
131
132 (define-public libtorrent
133 (package
134 (name "libtorrent")
135 (version "0.13.8")
136 (source (origin
137 (method url-fetch)
138 (uri (string-append
139 "http://rtorrent.net/downloads/libtorrent-"
140 version ".tar.gz"))
141 (sha256
142 (base32
143 "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd"))))
144 (build-system gnu-build-system)
145 (inputs `(("openssl" ,openssl)
146 ("zlib" ,zlib)))
147 (native-inputs `(("pkg-config" ,pkg-config)
148 ("cppunit" ,cppunit)))
149 (synopsis "BitTorrent library of rtorrent")
150 (description
151 "LibTorrent is a BitTorrent library used by and developed in parallel
152 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
153 speed and efficiency.")
154 (home-page "https://github.com/rakshasa/libtorrent")
155 (license l:gpl2+)))
156
157 (define-public rtorrent
158 (package
159 (name "rtorrent")
160 (version "0.9.8")
161 (source (origin
162 (method url-fetch)
163 (uri (string-append
164 "http://rtorrent.net/downloads/rtorrent-"
165 version ".tar.gz"))
166 (sha256
167 (base32
168 "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy"))))
169 (build-system gnu-build-system)
170 (inputs `(("libtorrent" ,libtorrent)
171 ("ncurses" ,ncurses)
172 ("curl" ,curl)
173 ("cyrus-sasl" ,cyrus-sasl)
174 ("openssl" ,openssl)
175 ("zlib" ,zlib)))
176 (native-inputs `(("pkg-config" ,pkg-config)
177 ("cppunit" ,cppunit)))
178 (synopsis "BitTorrent client with ncurses interface")
179 (description
180 "rTorrent is a BitTorrent client with an ncurses interface. It supports
181 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
182 XML-RPC over SCGI.")
183 (home-page "https://github.com/rakshasa/rtorrent")
184 (license l:gpl2+)))
185
186 (define-public tremc
187 (let ((commit "4d50dab7376601daca13f7be6eabc0eaa057c1b0")
188 (revision "0"))
189 (package
190 (name "tremc")
191 (version (git-version "0.9.1" revision commit))
192 (source
193 (origin
194 (method git-fetch)
195 (uri (git-reference
196 (url "https://github.com/tremc/tremc.git")
197 (commit commit)))
198 (file-name (git-file-name name version))
199 (sha256
200 (base32
201 "0qpi65n8rv7l9mg8qyqx70z83inkl8v5r5nks65c99lhscdki0w7"))))
202 (build-system gnu-build-system)
203 (arguments
204 `(#:tests? #f ; no test suite
205 #:make-flags
206 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
207 #:phases
208 (modify-phases %standard-phases
209 ;; The software is just a Python script that must be copied into place.
210 (delete 'configure)
211 (delete 'build))))
212 (inputs
213 `(("python" ,python)))
214 (synopsis "Console client for the Transmission BitTorrent daemon")
215 (description "Tremc is a console client, with a curses interface, for the
216 Transmission BitTorrent daemon.")
217 (home-page "https://github.com/tremc/tremc")
218 (license l:gpl3+))))
219
220 (define-public transmission-remote-cli
221 (package
222 (name "transmission-remote-cli")
223 (version "1.7.1")
224 (source (origin
225 (method git-fetch)
226 (uri (git-reference
227 (url "https://github.com/fagga/transmission-remote-cli.git")
228 (commit (string-append "v" version))))
229 (file-name (git-file-name name version))
230 (sha256
231 (base32
232 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
233 (build-system python-build-system)
234 (arguments
235 `(#:python ,python-2 ; only supports Python 2
236 #:tests? #f ; no test suite
237 #:phases (modify-phases %standard-phases
238 ;; The software is just a Python script that must be
239 ;; copied into place.
240 (delete 'build)
241 (replace 'install
242 (lambda* (#:key outputs #:allow-other-keys)
243 (let* ((out (assoc-ref outputs "out"))
244 (bin (string-append out "/bin"))
245 (man (string-append out "/share/man/man1"))
246 ;; FIXME install zsh completions
247 (completions (string-append out "/etc/bash_completion.d")))
248 (install-file "transmission-remote-cli" bin)
249 (install-file "transmission-remote-cli.1" man)
250 (install-file
251 (string-append
252 "completion/bash/"
253 "transmission-remote-cli-bash-completion.sh")
254 completions)))))))
255 (synopsis "Console client for the Transmission BitTorrent daemon")
256 (description "Transmission-remote-cli is a console client, with a curses
257 interface, for the Transmission BitTorrent daemon. This package is no longer
258 maintained upstream.")
259 (home-page "https://github.com/fagga/transmission-remote-cli")
260 (license l:gpl3+)
261 (properties `((superseded . ,tremc)))))
262
263 (define-public aria2
264 (package
265 (name "aria2")
266 (version "1.35.0")
267 (source (origin
268 (method url-fetch)
269 (uri (string-append "https://github.com/aria2/aria2/releases/"
270 "download/release-" version
271 "/aria2-" version ".tar.xz"))
272 (sha256
273 (base32
274 "1zbxc517d97lb96f15xcy4l7b66grxrp3h2ids2jiwkaip87yaqy"))))
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 (inputs `(("boost" ,boost)
406 ("openssl" ,openssl)))
407 (native-inputs `(("python" ,python-2)
408 ("pkg-config" ,pkg-config)))
409 (home-page "https://www.libtorrent.org/")
410 (synopsis "Feature complete BitTorrent implementation")
411 (description
412 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
413 focusing on efficiency and scalability. It runs on embedded devices as well as
414 desktops.")
415 (license l:bsd-2)))
416
417 (define-public qbittorrent
418 (package
419 (name "qbittorrent")
420 (version "4.2.1")
421 (source
422 (origin
423 (method git-fetch)
424 (uri (git-reference
425 (url "https://github.com/qbittorrent/qBittorrent.git")
426 (commit (string-append "release-" version))))
427 (file-name (git-file-name name version))
428 (sha256
429 (base32 "0bz4l7awkx4qf3gh9c8gj8fab989439zj8qy4x9r36wxdjg5cxil"))))
430 (build-system gnu-build-system)
431 (arguments
432 `(#:configure-flags
433 (list (string-append "--with-boost-libdir="
434 (assoc-ref %build-inputs "boost")
435 "/lib")
436 "--enable-debug"
437 "QMAKE_LRELEASE=lrelease")))
438 (native-inputs
439 `(("pkg-config" ,pkg-config)
440 ("qttools" ,qttools)))
441 (inputs
442 `(("boost" ,boost)
443 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
444 ("openssl" ,openssl)
445 ("python" ,python-wrapper)
446 ("qtbase" ,qtbase)
447 ("qtsvg" ,qtsvg)
448 ("zlib" ,zlib)))
449 (home-page "https://www.qbittorrent.org/")
450 (synopsis "Graphical BitTorrent client")
451 (description
452 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
453 libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
454
455 It aims to be a good alternative to all other BitTorrent clients out there.
456 qBittorrent is fast, stable and provides unicode support as well as many
457 features.")
458 (license l:gpl2+)))
459
460 (define-public deluge
461 (package
462 (name "deluge")
463 (version "1.3.15")
464 (source
465 (origin
466 (method url-fetch)
467 (uri (string-append
468 "http://download.deluge-torrent.org/source/deluge-"
469 version ".tar.xz"))
470 (sha256
471 (base32
472 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
473 (build-system python-build-system)
474 (inputs
475 `(("libtorrent" ,libtorrent-rasterbar)
476 ("python2-chardet" ,python2-chardet)
477 ("python2-pygtk" ,python2-pygtk)
478 ("python2-pyopenssl" ,python2-pyopenssl)
479 ("python2-pyxdg" ,python2-pyxdg)
480 ("python2-service-identity" ,python2-service-identity)
481 ("python2-twisted" ,python2-twisted)))
482 (native-inputs
483 `(("intltool" ,intltool)))
484 (arguments
485 `(#:python ,python-2))
486 (home-page "https://www.deluge-torrent.org/")
487 (synopsis "Fully-featured cross-platform ​BitTorrent client")
488 (description
489 "Deluge contains the common features to BitTorrent clients such as
490 Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
491 (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
492 speed limits. Deluge heavily utilises the ​libtorrent library. It is
493 designed to run as both a normal standalone desktop application and as a
494 ​client-server.")
495 (license l:gpl3+)))