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, 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>
13 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
66 (define-public transmission
73 "https://github.com/transmission/transmission-releases/raw/"
74 "master/transmission-" version ".tar.xz"))
77 "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m"))))
78 (build-system glib-or-gtk-build-system)
79 (outputs '("out" ; library and command-line interface
80 "gui")) ; graphical user interface
82 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
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
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")
94 "/bin/transmission-gtk"))
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")))
102 `(("inotify-tools" ,inotify-tools)
103 ("libevent" ,libevent)
105 ("cyrus-sasl" ,cyrus-sasl)
111 `(("intltool" ,intltool)
112 ("pkg-config" ,pkg-config)))
113 (home-page "http://www.transmissionbt.com/")
114 (synopsis "Fast and easy BitTorrent client")
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.")
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.
128 ;; A few files files carry an MIT/X11 license header.
131 (define-public libtorrent
138 "http://rtorrent.net/downloads/libtorrent-"
142 "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
143 (build-system gnu-build-system)
144 (inputs `(("openssl" ,openssl)
146 (native-inputs `(("pkg-config" ,pkg-config)
147 ("cppunit" ,cppunit)))
148 (synopsis "BitTorrent library of rtorrent")
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")
156 (define-public rtorrent
163 "http://rtorrent.net/downloads/rtorrent-"
167 "03jvzw9pi2mhcm913h8qg0qw9gwjqc6lhwynb1yz1y163x7w4s8y"))))
168 (build-system gnu-build-system)
169 (inputs `(("libtorrent" ,libtorrent)
172 ("cyrus-sasl" ,cyrus-sasl)
175 (native-inputs `(("pkg-config" ,pkg-config)
176 ("cppunit" ,cppunit)))
177 (synopsis "BitTorrent client with ncurses interface")
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
182 (home-page "https://github.com/rakshasa/rtorrent")
193 (url "https://github.com/tremc/tremc.git")
195 (file-name (git-file-name name version))
197 (base32 "1yhwvlcyv1s830p5a7q5x3mkb3mbvr5cn5nh7y62l5b6iyyynlvm"))))
198 (build-system gnu-build-system)
200 `(#:tests? #f ; no test suite
202 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
204 (modify-phases %standard-phases
205 ;; The software is just a Python script that must be copied into place.
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")
216 (define-public transmission-remote-cli
218 (name "transmission-remote-cli")
223 (url "https://github.com/fagga/transmission-remote-cli.git")
224 (commit (string-append "v" version))))
225 (file-name (git-file-name name version))
228 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
229 (build-system python-build-system)
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.
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)
249 "transmission-remote-cli-bash-completion.sh")
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")
257 (properties `((superseded . ,tremc)))))
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"))
271 "18vpgr430vxlwbcc3598rr1srfmwypls6wp1m4wf21hncc1ahi1s"))))
272 (build-system gnu-build-system)
274 `(#:configure-flags (list "--enable-libaria2"
275 (string-append "--with-bashcompletiondir="
276 %output "/etc/bash_completion.d/"))
278 (modify-phases %standard-phases
279 (add-after 'unpack 'delete-socket-tests
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)))
289 `(("cppunit" ,cppunit) ; for the tests
290 ("pkg-config" ,pkg-config)))
300 (home-page "https://aria2.github.io/")
301 (synopsis "Utility for parallel downloading files")
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.")
314 (uri (string-append "mirror://sourceforge/urlget/"
315 "uget%20%28stable%29/" version "/uget-"
319 "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
320 (build-system gnu-build-system)
326 ("gstreamer" ,gstreamer)
327 ("libgcrypt" ,libgcrypt)
328 ("libnotify" ,libnotify)
329 ("openssl" ,openssl)))
331 `(("intltool" ,intltool)
332 ("pkg-config" ,pkg-config)))
333 (home-page "http://ugetdm.com/")
334 (synopsis "Universal download manager with GTK+ interface")
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+)))
341 (define-public mktorrent
348 (url "https://github.com/Rudde/mktorrent.git")
349 (commit (string-append "v" version))))
350 (file-name (git-file-name name version))
353 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
354 (build-system gnu-build-system)
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"))
364 #:tests? #f)) ; no tests
365 (home-page "https://github.com/Rudde/mktorrent")
366 (synopsis "Utility to create BitTorrent metainfo files")
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
377 (define-public libtorrent-rasterbar
379 (name "libtorrent-rasterbar")
385 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
386 (string-join (string-split version #\.) "_")
387 "/libtorrent-rasterbar-" version ".tar.gz"))
390 "1mza92ljjqvlz9582pmls3n45srqhxvw3q348xihcg4fhlchf11h"))))
391 (build-system gnu-build-system)
394 (list (string-append "--with-boost-libdir="
395 (assoc-ref %build-inputs "boost")
397 "--enable-python-binding"
399 "CXXFLAGS=-std=c++11") ; Use std::chrono instead of boost
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
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'],"))
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")
421 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
422 focusing on efficiency and scalability. It runs on embedded devices as well as
426 (define-public qbittorrent
434 (url "https://github.com/qbittorrent/qBittorrent.git")
435 (commit (string-append "release-" version))))
436 (file-name (git-file-name name version))
438 (base32 "1y9kv84sy5fg64wbl4xpm8qh0hjba7ibk045cazp0m736rjmxk8c"))))
439 (build-system gnu-build-system)
442 (list (string-append "--with-boost-libdir="
443 (assoc-ref %build-inputs "boost")
446 "QMAKE_LRELEASE=lrelease")))
448 `(("pkg-config" ,pkg-config)
449 ("qttools" ,qttools)))
452 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
454 ("python" ,python-wrapper)
458 (home-page "https://www.qbittorrent.org/")
459 (synopsis "Graphical BitTorrent client")
461 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
462 libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
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
469 (define-public deluge
477 "http://download.deluge-torrent.org/source/deluge-"
481 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
482 (build-system python-build-system)
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)))
492 `(("intltool" ,intltool)))
494 `(#:python ,python-2))
495 (home-page "https://www.deluge-torrent.org/")
496 (synopsis "Fully-featured cross-platform BitTorrent client")
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