gnu: Move sqlite to separate module.
[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 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 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.6")
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 "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
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.6")
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 "03jvzw9pi2mhcm913h8qg0qw9gwjqc6lhwynb1yz1y163x7w4s8y"))))
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 (package
187 (name "tremc")
188 (version "0.9.1")
189 (source
190 (origin
191 (method git-fetch)
192 (uri (git-reference
193 (url "https://github.com/tremc/tremc.git")
194 (commit version)))
195 (file-name (git-file-name name version))
196 (sha256
197 (base32 "1yhwvlcyv1s830p5a7q5x3mkb3mbvr5cn5nh7y62l5b6iyyynlvm"))))
198 (build-system gnu-build-system)
199 (arguments
200 `(#:tests? #f ; no test suite
201 #:make-flags
202 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
203 #:phases
204 (modify-phases %standard-phases
205 ;; The software is just a Python script that must be copied into place.
206 (delete 'configure)
207 (delete 'build))))
208 (inputs
209 `(("python" ,python)))
210 (synopsis "Console client for the Transmission BitTorrent daemon")
211 (description "Tremc is a console client, with a curses interface, for the
212 Transmission BitTorrent daemon.")
213 (home-page "https://github.com/tremc/tremc")
214 (license l:gpl3+)))
215
216 (define-public transmission-remote-cli
217 (package
218 (name "transmission-remote-cli")
219 (version "1.7.1")
220 (source (origin
221 (method git-fetch)
222 (uri (git-reference
223 (url "https://github.com/fagga/transmission-remote-cli.git")
224 (commit (string-append "v" version))))
225 (file-name (git-file-name name version))
226 (sha256
227 (base32
228 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
229 (build-system python-build-system)
230 (arguments
231 `(#:python ,python-2 ; only supports Python 2
232 #:tests? #f ; no test suite
233 #:phases (modify-phases %standard-phases
234 ;; The software is just a Python script that must be
235 ;; copied into place.
236 (delete 'build)
237 (replace 'install
238 (lambda* (#:key outputs #:allow-other-keys)
239 (let* ((out (assoc-ref outputs "out"))
240 (bin (string-append out "/bin"))
241 (man (string-append out "/share/man/man1"))
242 ;; FIXME install zsh completions
243 (completions (string-append out "/etc/bash_completion.d")))
244 (install-file "transmission-remote-cli" bin)
245 (install-file "transmission-remote-cli.1" man)
246 (install-file
247 (string-append
248 "completion/bash/"
249 "transmission-remote-cli-bash-completion.sh")
250 completions)))))))
251 (synopsis "Console client for the Transmission BitTorrent daemon")
252 (description "Transmission-remote-cli is a console client, with a curses
253 interface, for the Transmission BitTorrent daemon. This package is no longer
254 maintained upstream.")
255 (home-page "https://github.com/fagga/transmission-remote-cli")
256 (license l:gpl3+)
257 (properties `((superseded . ,tremc)))))
258
259 (define-public aria2
260 (package
261 (name "aria2")
262 (version "1.34.0")
263 (source (origin
264 (method url-fetch)
265 (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
266 "releases/download/release-" version "/"
267 name "-" version ".tar.xz"))
268 (patches (search-patches "aria2-CVE-2019-3500.patch"))
269 (sha256
270 (base32
271 "18vpgr430vxlwbcc3598rr1srfmwypls6wp1m4wf21hncc1ahi1s"))))
272 (build-system gnu-build-system)
273 (arguments
274 `(#:configure-flags (list "--enable-libaria2"
275 (string-append "--with-bashcompletiondir="
276 %output "/etc/bash_completion.d/"))
277 #:phases
278 (modify-phases %standard-phases
279 (add-after 'unpack 'delete-socket-tests
280 (lambda _
281 (substitute* "test/LpdMessageDispatcherTest.cc"
282 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
283 (string-append "// " text)))
284 (substitute* "test/LpdMessageReceiverTest.cc"
285 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
286 (string-append "// " text)))
287 #t)))))
288 (native-inputs
289 `(("cppunit" ,cppunit) ; for the tests
290 ("pkg-config" ,pkg-config)))
291 (inputs
292 `(("c-ares" ,c-ares)
293 ("gnutls" ,gnutls)
294 ("gmp" ,gmp)
295 ("libssh2" ,libssh2)
296 ("libxml2" ,libxml2)
297 ("nettle" ,nettle)
298 ("sqlite" ,sqlite)
299 ("zlib" ,zlib)))
300 (home-page "https://aria2.github.io/")
301 (synopsis "Utility for parallel downloading files")
302 (description
303 "Aria2 is a lightweight, multi-protocol & multi-source command-line
304 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
305 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
306 (license l:gpl2+)))
307
308 (define-public uget
309 (package
310 (name "uget")
311 (version "2.0.8")
312 (source (origin
313 (method url-fetch)
314 (uri (string-append "mirror://sourceforge/urlget/"
315 "uget%20%28stable%29/" version "/uget-"
316 version ".tar.gz"))
317 (sha256
318 (base32
319 "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
320 (build-system gnu-build-system)
321 (inputs
322 `(("curl" ,curl)
323 ("gtk+" ,gtk+)
324 ("glib" ,glib)
325 ("gnutls" ,gnutls)
326 ("gstreamer" ,gstreamer)
327 ("libgcrypt" ,libgcrypt)
328 ("libnotify" ,libnotify)
329 ("openssl" ,openssl)))
330 (native-inputs
331 `(("intltool" ,intltool)
332 ("pkg-config" ,pkg-config)))
333 (home-page "http://ugetdm.com/")
334 (synopsis "Universal download manager with GTK+ interface")
335 (description
336 "uGet is portable download manager with GTK+ interface supporting
337 HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
338 downloads, download scheduling, download rate limiting.")
339 (license l:lgpl2.1+)))
340
341 (define-public mktorrent
342 (package
343 (name "mktorrent")
344 (version "1.1")
345 (source (origin
346 (method git-fetch)
347 (uri (git-reference
348 (url "https://github.com/Rudde/mktorrent.git")
349 (commit (string-append "v" version))))
350 (file-name (git-file-name name version))
351 (sha256
352 (base32
353 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
354 (build-system gnu-build-system)
355 (arguments
356 `(#:phases (modify-phases %standard-phases
357 (delete 'configure)) ; no configure script
358 #:make-flags (list "CC=gcc"
359 (string-append "PREFIX=" (assoc-ref %outputs "out"))
360 "NO_HASH_CHECK=1"
361 "USE_LARGE_FILES=1"
362 "USE_LONG_OPTIONS=1"
363 "USE_PTHREADS=1")
364 #:tests? #f)) ; no tests
365 (home-page "https://github.com/Rudde/mktorrent")
366 (synopsis "Utility to create BitTorrent metainfo files")
367 (description
368 "mktorrent is a simple command-line utility to create BitTorrent
369 @dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
370 files and whole directories. It can add multiple trackers and web seed URLs,
371 and set the @code{private} flag to disallow advertisement through the
372 distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
373 and will take advantage of multiple processor cores where possible.")
374 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
375 l:gpl2+)))) ; with permission to link with OpenSSL
376
377 (define-public libtorrent-rasterbar
378 (package
379 (name "libtorrent-rasterbar")
380 (version "1.1.11")
381 (source (origin
382 (method url-fetch)
383 (uri
384 (string-append
385 "https://github.com/arvidn/libtorrent/releases/download/libtorrent_"
386 (string-join (string-split version #\.) "_")
387 "/libtorrent-rasterbar-" version ".tar.gz"))
388 (sha256
389 (base32
390 "0isqidr11fnhybr0wvk0qxd97jaikmh8fx9h89b84yd2gyxdw8vw"))))
391 (build-system gnu-build-system)
392 (arguments
393 `(#:configure-flags
394 (list (string-append "--with-boost-libdir="
395 (assoc-ref %build-inputs "boost")
396 "/lib")
397 "--enable-python-binding"
398 "--enable-tests"
399 "CXXFLAGS=-std=c++11") ; Use std::chrono instead of boost
400 #:make-flags (list
401 (string-append "LDFLAGS=-Wl,-rpath="
402 (assoc-ref %outputs "out") "/lib"))
403 #:phases (modify-phases %standard-phases
404 (add-after 'unpack 'compile-python-c++11
405 (lambda _
406 ;; Make sure the Python bindings are compiled in C++ mode to
407 ;; avoid undefined references as mentioned in
408 ;; <https://github.com/qbittorrent/qBittorrent/issues/638>.
409 ;; XXX: This can be removed for 1.2+.
410 (substitute* "bindings/python/setup.py"
411 (("\\+ target_specific\\(\\)\\,")
412 "+ target_specific() + ['-std=c++11'],"))
413 #t)))))
414 (inputs `(("boost" ,boost)
415 ("openssl" ,openssl)))
416 (native-inputs `(("python" ,python-2)
417 ("pkg-config" ,pkg-config)))
418 (home-page "https://www.libtorrent.org/")
419 (synopsis "Feature complete BitTorrent implementation")
420 (description
421 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
422 focusing on efficiency and scalability. It runs on embedded devices as well as
423 desktops.")
424 (license l:bsd-2)))
425
426 (define-public qbittorrent
427 (package
428 (name "qbittorrent")
429 (version "4.1.3")
430 (source (origin
431 (method url-fetch)
432 (uri (string-append
433 "https://github.com/qbittorrent/qBittorrent/archive/release-"
434 version ".tar.gz"))
435 (file-name (string-append name "-release-" version ".tar.gz"))
436 (sha256
437 (base32
438 "00zrpnwanq9f7maky2z4wnzw08xy902s77scm2gcvxxxankr4j92"))))
439 (build-system gnu-build-system)
440 (arguments
441 `(#:configure-flags
442 (list (string-append "--with-boost-libdir="
443 (assoc-ref %build-inputs "boost")
444 "/lib")
445 "--enable-debug"
446 "QMAKE_LRELEASE=lrelease")))
447 (native-inputs
448 `(("pkg-config" ,pkg-config)
449 ("qttools" ,qttools)))
450 (inputs
451 `(("boost" ,boost)
452 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
453 ("openssl" ,openssl)
454 ("python" ,python-wrapper)
455 ("qtbase" ,qtbase)
456 ("qtsvg" ,qtsvg)
457 ("zlib" ,zlib)))
458 (home-page "https://www.qbittorrent.org/")
459 (synopsis "Graphical BitTorrent client")
460 (description
461 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
462 libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
463
464 It aims to be a good alternative to all other BitTorrent clients out there.
465 qBittorrent is fast, stable and provides unicode support as well as many
466 features.")
467 (license l:gpl2+)))
468
469 (define-public deluge
470 (package
471 (name "deluge")
472 (version "1.3.15")
473 (source
474 (origin
475 (method url-fetch)
476 (uri (string-append
477 "http://download.deluge-torrent.org/source/deluge-"
478 version ".tar.xz"))
479 (sha256
480 (base32
481 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
482 (build-system python-build-system)
483 (inputs
484 `(("libtorrent" ,libtorrent-rasterbar)
485 ("python2-chardet" ,python2-chardet)
486 ("python2-pygtk" ,python2-pygtk)
487 ("python2-pyopenssl" ,python2-pyopenssl)
488 ("python2-pyxdg" ,python2-pyxdg)
489 ("python2-service-identity" ,python2-service-identity)
490 ("python2-twisted" ,python2-twisted)))
491 (native-inputs
492 `(("intltool" ,intltool)))
493 (arguments
494 `(#:python ,python-2))
495 (home-page "https://www.deluge-torrent.org/")
496 (synopsis "Fully-featured cross-platform ​BitTorrent client")
497 (description
498 "Deluge contains the common features to BitTorrent clients such as
499 Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
500 (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
501 speed limits. Deluge heavily utilises the ​libtorrent library. It is
502 designed to run as both a normal standalone desktop application and as a
503 ​client-server.")
504 (license l:gpl3+)))