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, 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' and icon files as well.
98 (mkdir (string-append gui "/share"))
99 (for-each
100 (lambda (dir)
101 (rename-file (string-append out "/share/" dir)
102 (string-append gui "/share/" dir)))
103 '("applications" "icons" "pixmaps")))
104 #t)))))
105 (inputs
106 `(("inotify-tools" ,inotify-tools)
107 ("libevent" ,libevent)
108 ("curl" ,curl)
109 ("cyrus-sasl" ,cyrus-sasl)
110 ("openssl" ,openssl)
111 ("file" ,file)
112 ("zlib" ,zlib)
113 ("gtk+" ,gtk+)))
114 (native-inputs
115 `(("intltool" ,intltool)
116 ("pkg-config" ,pkg-config)))
117 (home-page "https://transmissionbt.com/")
118 (synopsis "Fast and easy BitTorrent client")
119 (description
120 "Transmission is a BitTorrent client that comes with graphical,
121 textual, and Web user interfaces. Transmission also has a daemon for
122 unattended operations. It supports local peer discovery, full encryption,
123 DHT, µTP, PEX and Magnet Links.")
124
125 ;; COPYING reads:
126 ;;
127 ;; Transmission can be redistributed and/or modified under the terms of
128 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
129 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
130 ;; or any future license endorsed by Mnemosyne LLC.
131 ;;
132 ;; A few files files carry an MIT/X11 license header.
133 (license l:gpl3+)))
134
135 (define-public libtorrent
136 (package
137 (name "libtorrent")
138 (version "0.13.8")
139 (source (origin
140 (method url-fetch)
141 (uri (string-append
142 "http://rtorrent.net/downloads/libtorrent-"
143 version ".tar.gz"))
144 (sha256
145 (base32
146 "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd"))))
147 (build-system gnu-build-system)
148 (inputs `(("openssl" ,openssl)
149 ("zlib" ,zlib)))
150 (native-inputs `(("pkg-config" ,pkg-config)
151 ("cppunit" ,cppunit)))
152 (synopsis "BitTorrent library of rtorrent")
153 (description
154 "LibTorrent is a BitTorrent library used by and developed in parallel
155 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
156 speed and efficiency.")
157 (home-page "https://github.com/rakshasa/libtorrent")
158 (license l:gpl2+)))
159
160 (define-public rtorrent
161 (package
162 (name "rtorrent")
163 (version "0.9.8")
164 (source (origin
165 (method url-fetch)
166 (uri (string-append
167 "http://rtorrent.net/downloads/rtorrent-"
168 version ".tar.gz"))
169 (sha256
170 (base32
171 "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy"))))
172 (build-system gnu-build-system)
173 (inputs `(("libtorrent" ,libtorrent)
174 ("ncurses" ,ncurses)
175 ("curl" ,curl)
176 ("cyrus-sasl" ,cyrus-sasl)
177 ("openssl" ,openssl)
178 ("zlib" ,zlib)))
179 (native-inputs `(("pkg-config" ,pkg-config)
180 ("cppunit" ,cppunit)))
181 (synopsis "BitTorrent client with ncurses interface")
182 (description
183 "rTorrent is a BitTorrent client with an ncurses interface. It supports
184 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
185 XML-RPC over SCGI.")
186 (home-page "https://github.com/rakshasa/rtorrent")
187 (license l:gpl2+)))
188
189 (define-public tremc
190 (let ((commit "4d50dab7376601daca13f7be6eabc0eaa057c1b0")
191 (revision "0"))
192 (package
193 (name "tremc")
194 (version (git-version "0.9.1" revision commit))
195 (source
196 (origin
197 (method git-fetch)
198 (uri (git-reference
199 (url "https://github.com/tremc/tremc.git")
200 (commit commit)))
201 (file-name (git-file-name name version))
202 (sha256
203 (base32
204 "0qpi65n8rv7l9mg8qyqx70z83inkl8v5r5nks65c99lhscdki0w7"))))
205 (build-system gnu-build-system)
206 (arguments
207 `(#:tests? #f ; no test suite
208 #:make-flags
209 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
210 #:phases
211 (modify-phases %standard-phases
212 ;; The software is just a Python script that must be copied into place.
213 (delete 'configure)
214 (delete 'build))))
215 (inputs
216 `(("python" ,python)))
217 (synopsis "Console client for the Transmission BitTorrent daemon")
218 (description "Tremc is a console client, with a curses interface, for the
219 Transmission BitTorrent daemon.")
220 (home-page "https://github.com/tremc/tremc")
221 (license l:gpl3+))))
222
223 (define-public transmission-remote-cli
224 (package
225 (name "transmission-remote-cli")
226 (version "1.7.1")
227 (source (origin
228 (method git-fetch)
229 (uri (git-reference
230 (url "https://github.com/fagga/transmission-remote-cli.git")
231 (commit (string-append "v" version))))
232 (file-name (git-file-name name version))
233 (sha256
234 (base32
235 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
236 (build-system python-build-system)
237 (arguments
238 `(#:python ,python-2 ; only supports Python 2
239 #:tests? #f ; no test suite
240 #:phases (modify-phases %standard-phases
241 ;; The software is just a Python script that must be
242 ;; copied into place.
243 (delete 'build)
244 (replace 'install
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let* ((out (assoc-ref outputs "out"))
247 (bin (string-append out "/bin"))
248 (man (string-append out "/share/man/man1"))
249 ;; FIXME install zsh completions
250 (completions (string-append out "/etc/bash_completion.d")))
251 (install-file "transmission-remote-cli" bin)
252 (install-file "transmission-remote-cli.1" man)
253 (install-file
254 (string-append
255 "completion/bash/"
256 "transmission-remote-cli-bash-completion.sh")
257 completions)))))))
258 (synopsis "Console client for the Transmission BitTorrent daemon")
259 (description "Transmission-remote-cli is a console client, with a curses
260 interface, for the Transmission BitTorrent daemon. This package is no longer
261 maintained upstream.")
262 (home-page "https://github.com/fagga/transmission-remote-cli")
263 (license l:gpl3+)
264 (properties `((superseded . ,tremc)))))
265
266 (define-public aria2
267 (package
268 (name "aria2")
269 (version "1.35.0")
270 (source (origin
271 (method url-fetch)
272 (uri (string-append "https://github.com/aria2/aria2/releases/"
273 "download/release-" version
274 "/aria2-" version ".tar.xz"))
275 (sha256
276 (base32
277 "1zbxc517d97lb96f15xcy4l7b66grxrp3h2ids2jiwkaip87yaqy"))))
278 (build-system gnu-build-system)
279 (arguments
280 `(#:configure-flags (list "--enable-libaria2"
281 (string-append "--with-bashcompletiondir="
282 %output "/etc/bash_completion.d/"))
283 #:phases
284 (modify-phases %standard-phases
285 (add-after 'unpack 'delete-socket-tests
286 (lambda _
287 (substitute* "test/LpdMessageDispatcherTest.cc"
288 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
289 (string-append "// " text)))
290 (substitute* "test/LpdMessageReceiverTest.cc"
291 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
292 (string-append "// " text)))
293 #t)))))
294 (native-inputs
295 `(("cppunit" ,cppunit) ; for the tests
296 ("pkg-config" ,pkg-config)))
297 (inputs
298 `(("c-ares" ,c-ares)
299 ("gnutls" ,gnutls)
300 ("gmp" ,gmp)
301 ("libssh2" ,libssh2)
302 ("libxml2" ,libxml2)
303 ("nettle" ,nettle)
304 ("sqlite" ,sqlite)
305 ("zlib" ,zlib)))
306 (home-page "https://aria2.github.io/")
307 (synopsis "Utility for parallel downloading files")
308 (description
309 "Aria2 is a lightweight, multi-protocol & multi-source command-line
310 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
311 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
312 (license l:gpl2+)))
313
314 (define-public uget
315 (package
316 (name "uget")
317 (version "2.0.8")
318 (source (origin
319 (method url-fetch)
320 (uri (string-append "mirror://sourceforge/urlget/"
321 "uget%20%28stable%29/" version "/uget-"
322 version ".tar.gz"))
323 (sha256
324 (base32
325 "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
326 (build-system gnu-build-system)
327 (inputs
328 `(("curl" ,curl)
329 ("gtk+" ,gtk+)
330 ("glib" ,glib)
331 ("gnutls" ,gnutls)
332 ("gstreamer" ,gstreamer)
333 ("libgcrypt" ,libgcrypt)
334 ("libnotify" ,libnotify)
335 ("openssl" ,openssl)))
336 (native-inputs
337 `(("intltool" ,intltool)
338 ("pkg-config" ,pkg-config)))
339 (home-page "http://ugetdm.com/")
340 (synopsis "Universal download manager with GTK+ interface")
341 (description
342 "uGet is portable download manager with GTK+ interface supporting
343 HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
344 downloads, download scheduling, download rate limiting.")
345 (license l:lgpl2.1+)))
346
347 (define-public mktorrent
348 (package
349 (name "mktorrent")
350 (version "1.1")
351 (source (origin
352 (method git-fetch)
353 (uri (git-reference
354 (url "https://github.com/Rudde/mktorrent.git")
355 (commit (string-append "v" version))))
356 (file-name (git-file-name name version))
357 (sha256
358 (base32
359 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
360 (build-system gnu-build-system)
361 (arguments
362 `(#:phases (modify-phases %standard-phases
363 (delete 'configure)) ; no configure script
364 #:make-flags (list "CC=gcc"
365 (string-append "PREFIX=" (assoc-ref %outputs "out"))
366 "NO_HASH_CHECK=1"
367 "USE_LARGE_FILES=1"
368 "USE_LONG_OPTIONS=1"
369 "USE_PTHREADS=1")
370 #:tests? #f)) ; no tests
371 (home-page "https://github.com/Rudde/mktorrent")
372 (synopsis "Utility to create BitTorrent metainfo files")
373 (description
374 "mktorrent is a simple command-line utility to create BitTorrent
375 @dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
376 files and whole directories. It can add multiple trackers and web seed URLs,
377 and set the @code{private} flag to disallow advertisement through the
378 distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
379 and will take advantage of multiple processor cores where possible.")
380 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
381 l:gpl2+)))) ; with permission to link with OpenSSL
382
383 (define-public libtorrent-rasterbar
384 (package
385 (name "libtorrent-rasterbar")
386 (version "1.1.14")
387 (source (origin
388 (method url-fetch)
389 (uri
390 (string-append
391 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
392 (string-join (string-split version #\.) "_")
393 "/libtorrent-rasterbar-" version ".tar.gz"))
394 (sha256
395 (base32
396 "0sn3ingmk1lk9p56f9ifgdwhjg0qizcfgv15wyc9s71nm5fya7sc"))))
397 (build-system gnu-build-system)
398 (arguments
399 `(#:configure-flags
400 (list (string-append "--with-boost-libdir="
401 (assoc-ref %build-inputs "boost")
402 "/lib")
403 "--enable-python-binding"
404 "--enable-tests")
405 #:make-flags (list
406 (string-append "LDFLAGS=-Wl,-rpath="
407 (assoc-ref %outputs "out") "/lib"))))
408 (inputs `(("boost" ,boost)
409 ("openssl" ,openssl)))
410 (native-inputs `(("python" ,python-wrapper)
411 ("pkg-config" ,pkg-config)))
412 (home-page "https://www.libtorrent.org/")
413 (synopsis "Feature complete BitTorrent implementation")
414 (description
415 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
416 focusing on efficiency and scalability. It runs on embedded devices as well as
417 desktops.")
418 (license l:bsd-2)))
419
420 (define-public qbittorrent
421 (package
422 (name "qbittorrent")
423 (version "4.2.1")
424 (source
425 (origin
426 (method git-fetch)
427 (uri (git-reference
428 (url "https://github.com/qbittorrent/qBittorrent.git")
429 (commit (string-append "release-" version))))
430 (file-name (git-file-name name version))
431 (sha256
432 (base32 "0bz4l7awkx4qf3gh9c8gj8fab989439zj8qy4x9r36wxdjg5cxil"))))
433 (build-system gnu-build-system)
434 (arguments
435 `(#:configure-flags
436 (list (string-append "--with-boost-libdir="
437 (assoc-ref %build-inputs "boost")
438 "/lib")
439 "--enable-debug"
440 "QMAKE_LRELEASE=lrelease")
441 #:modules ((guix build gnu-build-system)
442 (guix build qt-utils)
443 (guix build utils))
444 #:imported-modules (,@%gnu-build-system-modules
445 (guix build qt-utils))
446 #:phases
447 (modify-phases %standard-phases
448 (add-after 'install 'wrap-qt
449 (lambda* (#:key outputs #:allow-other-keys)
450 (wrap-qt-program (assoc-ref outputs "out") "qbittorrent")
451 #t)))))
452 (native-inputs
453 `(("pkg-config" ,pkg-config)
454 ("qttools" ,qttools)))
455 (inputs
456 `(("boost" ,boost)
457 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
458 ("openssl" ,openssl)
459 ("python" ,python-wrapper)
460 ("qtbase" ,qtbase)
461 ("qtsvg" ,qtsvg)
462 ("zlib" ,zlib)))
463 (home-page "https://www.qbittorrent.org/")
464 (synopsis "Graphical BitTorrent client")
465 (description
466 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
467 libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
468
469 It aims to be a good alternative to all other BitTorrent clients out there.
470 qBittorrent is fast, stable and provides unicode support as well as many
471 features.")
472 (license l:gpl2+)))
473
474 (define-public deluge
475 (package
476 (name "deluge")
477 (version "1.3.15")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (string-append
482 "http://download.deluge-torrent.org/source/deluge-"
483 version ".tar.xz"))
484 (sha256
485 (base32
486 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
487 (build-system python-build-system)
488 (inputs
489 `(("libtorrent" ,libtorrent-rasterbar)
490 ("python2-chardet" ,python2-chardet)
491 ("python2-pygtk" ,python2-pygtk)
492 ("python2-pyopenssl" ,python2-pyopenssl)
493 ("python2-pyxdg" ,python2-pyxdg)
494 ("python2-service-identity" ,python2-service-identity)
495 ("python2-twisted" ,python2-twisted)))
496 (native-inputs
497 `(("intltool" ,intltool)))
498 (arguments
499 `(#:python ,python-2))
500 (home-page "https://www.deluge-torrent.org/")
501 (synopsis "Fully-featured cross-platform ​BitTorrent client")
502 (description
503 "Deluge contains the common features to BitTorrent clients such as
504 Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
505 (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
506 speed limits. Deluge heavily utilises the ​libtorrent library. It is
507 designed to run as both a normal standalone desktop application and as a
508 ​client-server.")
509 (license l:gpl3+)))