gnu: Add symmetrica.
[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>
8322ecb0 4;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
c9dbcd20 5;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
4b67098d 6;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
cdda263b 7;;; Copyright © 2016, 2017, 2018, 2019 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>
3963a729
LC
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)
e906f4e1 31 #:use-module (guix git-download)
3963a729 32 #:use-module (guix build-system gnu)
feb767b2 33 #:use-module (guix build-system python)
4cdec09a 34 #:use-module (guix build-system glib-or-gtk)
b5b73a82 35 #:use-module ((guix licenses) #:prefix l:)
3c569804 36 #:use-module (gnu packages)
f66842dc 37 #:use-module (gnu packages adns)
4e58e9d0 38 #:use-module (gnu packages boost)
f66842dc
EF
39 #:use-module (gnu packages check)
40 #:use-module (gnu packages compression)
4b67098d 41 #:use-module (gnu packages crypto)
3963a729 42 #:use-module (gnu packages curl)
f66842dc 43 #:use-module (gnu packages cyrus-sasl)
3963a729 44 #:use-module (gnu packages file)
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
EF
51 #:use-module (gnu packages libevent)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages nettle)
2d8dc79c 55 #:use-module (gnu packages ncurses)
f66842dc 56 #:use-module (gnu packages pkg-config)
feb767b2 57 #:use-module (gnu packages python)
c2be790f 58 #:use-module (gnu packages python-crypto)
44d10b1f 59 #:use-module (gnu packages python-xyz)
f8fbe376 60 #:use-module (gnu packages qt)
cd0322a3 61 #:use-module (gnu packages sqlite)
f66842dc
EF
62 #:use-module (gnu packages ssh)
63 #:use-module (gnu packages tls)
64 #:use-module (gnu packages xml))
3963a729
LC
65
66(define-public transmission
67 (package
68 (name "transmission")
0aa23e02 69 (version "2.94")
3963a729
LC
70 (source (origin
71 (method url-fetch)
72 (uri (string-append
547c4bd2
LF
73 "https://github.com/transmission/transmission-releases/raw/"
74 "master/transmission-" version ".tar.xz"))
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
dc1d3cde
KK
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)))))
3963a729
LC
101 (inputs
102 `(("inotify-tools" ,inotify-tools)
103 ("libevent" ,libevent)
104 ("curl" ,curl)
4f55441f 105 ("cyrus-sasl" ,cyrus-sasl)
3963a729
LC
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,
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.
129 (license l:gpl3+)))
df66fee7
LC
130
131(define-public libtorrent
132 (package
133 (name "libtorrent")
29b4c57b 134 (version "0.13.6")
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
29b4c57b 142 "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
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")
9fbd458b 159 (version "0.9.6")
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
9fbd458b 167 "03jvzw9pi2mhcm913h8qg0qw9gwjqc6lhwynb1yz1y163x7w4s8y"))))
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
96e2ecb7
TGR
186 (package
187 (name "tremc")
188 (version "0.9.1")
189 (source
190 (origin
191 (method git-fetch)
192 (uri (git-reference
a1225ae8 193 (url "https://github.com/tremc/tremc.git")
96e2ecb7
TGR
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
e906f4e1 212Transmission BitTorrent daemon.")
a1225ae8 213 (home-page "https://github.com/tremc/tremc")
96e2ecb7 214 (license l:gpl3+)))
feb767b2
LF
215
216(define-public transmission-remote-cli
217 (package
218 (name "transmission-remote-cli")
219 (version "1.7.1")
220 (source (origin
8322ecb0
RW
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))
feb767b2
LF
226 (sha256
227 (base32
8322ecb0 228 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
feb767b2
LF
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
aaf111a2
LF
253interface, for the Transmission BitTorrent daemon. This package is no longer
254maintained upstream.")
feb767b2 255 (home-page "https://github.com/fagga/transmission-remote-cli")
aaf111a2
LF
256 (license l:gpl3+)
257 (properties `((superseded . ,tremc)))))
f66842dc
EF
258
259(define-public aria2
260 (package
261 (name "aria2")
c9dbcd20 262 (version "1.34.0")
f66842dc
EF
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"))
e82c98ab 268 (patches (search-patches "aria2-CVE-2019-3500.patch"))
f66842dc
EF
269 (sha256
270 (base32
c9dbcd20 271 "18vpgr430vxlwbcc3598rr1srfmwypls6wp1m4wf21hncc1ahi1s"))))
f66842dc
EF
272 (build-system gnu-build-system)
273 (arguments
d2a7a145
EF
274 `(#:configure-flags (list "--enable-libaria2"
275 (string-append "--with-bashcompletiondir="
276 %output "/etc/bash_completion.d/"))
f66842dc
EF
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)
9c64f76e
EF
286 (string-append "// " text)))
287 #t)))))
f66842dc 288 (native-inputs
5bed95ef
EF
289 `(("cppunit" ,cppunit) ; for the tests
290 ("pkg-config" ,pkg-config)))
f66842dc
EF
291 (inputs
292 `(("c-ares" ,c-ares)
f66842dc
EF
293 ("gnutls" ,gnutls)
294 ("gmp" ,gmp)
295 ("libssh2" ,libssh2)
296 ("libxml2" ,libxml2)
297 ("nettle" ,nettle)
298 ("sqlite" ,sqlite)
299 ("zlib" ,zlib)))
5bed95ef 300 (home-page "https://aria2.github.io/")
f66842dc
EF
301 (synopsis "Utility for parallel downloading files")
302 (description
303 "Aria2 is a lightweight, multi-protocol & multi-source command-line
304download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
305Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
306 (license l:gpl2+)))
4b67098d 307
4b67098d
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)
4b67098d
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
c7ad32d9
EF
331 `(("intltool" ,intltool)
332 ("pkg-config" ,pkg-config)))
4b67098d
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
337HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
338downloads, download scheduling, download rate limiting.")
339 (license l:lgpl2.1+)))
8975d00c
TGR
340
341(define-public mktorrent
342 (package
343 (name "mktorrent")
fd90e396 344 (version "1.1")
8975d00c 345 (source (origin
4342a046
RW
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))
8975d00c
TGR
351 (sha256
352 (base32
4342a046 353 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
8975d00c
TGR
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
fd90e396 365 (home-page "https://github.com/Rudde/mktorrent")
8975d00c 366 (synopsis "Utility to create BitTorrent metainfo files")
897bd0b5
TGR
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
370files and whole directories. It can add multiple trackers and web seed URLs,
371and set the @code{private} flag to disallow advertisement through the
372distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
8975d00c
TGR
373and 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
4e58e9d0
JL
376
377(define-public libtorrent-rasterbar
378 (package
379 (name "libtorrent-rasterbar")
3fde051b 380 (version "1.1.13")
4e58e9d0
JL
381 (source (origin
382 (method url-fetch)
383 (uri
384 (string-append
3fde051b 385 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
3c569804
MB
386 (string-join (string-split version #\.) "_")
387 "/libtorrent-rasterbar-" version ".tar.gz"))
4e58e9d0
JL
388 (sha256
389 (base32
3fde051b 390 "1mza92ljjqvlz9582pmls3n45srqhxvw3q348xihcg4fhlchf11h"))))
4e58e9d0
JL
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"
395541b0
FT
398 "--enable-tests"
399 "CXXFLAGS=-std=c++11") ; Use std::chrono instead of boost
4e58e9d0
JL
400 #:make-flags (list
401 (string-append "LDFLAGS=-Wl,-rpath="
39da44c2
NN
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)))))
4e58e9d0
JL
414 (inputs `(("boost" ,boost)
415 ("openssl" ,openssl)))
416 (native-inputs `(("python" ,python-2)
417 ("pkg-config" ,pkg-config)))
9270b2fb 418 (home-page "https://www.libtorrent.org/")
4e58e9d0
JL
419 (synopsis "Feature complete BitTorrent implementation")
420 (description
421 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
422focusing on efficiency and scalability. It runs on embedded devices as well as
423desktops.")
424 (license l:bsd-2)))
425
f8fbe376
FT
426(define-public qbittorrent
427 (package
428 (name "qbittorrent")
6cc9533e 429 (version "4.1.6")
0748a7b2
TGR
430 (source
431 (origin
432 (method git-fetch)
433 (uri (git-reference
434 (url "https://github.com/qbittorrent/qBittorrent.git")
435 (commit (string-append "release-" version))))
436 (file-name (git-file-name name version))
437 (sha256
6cc9533e 438 (base32 "1y9kv84sy5fg64wbl4xpm8qh0hjba7ibk045cazp0m736rjmxk8c"))))
f8fbe376
FT
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)
ea236462 454 ("python" ,python-wrapper)
f8fbe376
FT
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
462libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
4e58e9d0 463
f8fbe376
FT
464It aims to be a good alternative to all other BitTorrent clients out there.
465qBittorrent is fast, stable and provides unicode support as well as many
466features.")
467 (license l:gpl2+)))
c2be790f
NN
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
499Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
500(PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
501speed limits. Deluge heavily utilises the ​libtorrent library. It is
502designed to run as both a normal standalone desktop application and as a
503​client-server.")
504 (license l:gpl3+)))