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, 2020 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, 2020 Brett Gilio <brettg@gnu.org>
14 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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 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 multiprecision)
53 #:use-module (gnu packages nettle)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages python-crypto)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages qt)
60 #:use-module (gnu packages sqlite)
61 #:use-module (gnu packages ssh)
62 #:use-module (gnu packages tls)
63 #:use-module (gnu packages xml))
65 (define-public transmission
71 (uri (string-append "https://github.com/transmission/transmission"
72 "/releases/download/" version "/transmission-"
76 "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i"))))
77 (build-system glib-or-gtk-build-system)
78 (outputs '("out" ; library and command-line interface
79 "gui")) ; graphical user interface
81 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
83 (modify-phases %standard-phases
84 (add-after 'install 'move-gui
85 (lambda* (#:key outputs #:allow-other-keys)
86 ;; Move the GUI to its own output, so that "out" doesn't
88 (let ((out (assoc-ref outputs "out"))
89 (gui (assoc-ref outputs "gui")))
90 (mkdir-p (string-append gui "/bin"))
91 (rename-file (string-append out "/bin/transmission-gtk")
92 (string-append gui "/bin/transmission-gtk"))
94 ;; Move the '.desktop' and icon files as well.
95 (mkdir (string-append gui "/share"))
98 (rename-file (string-append out "/share/" dir)
99 (string-append gui "/share/" dir)))
100 '("applications" "icons" "pixmaps")))
103 `(("libevent" ,libevent)
109 `(("intltool" ,intltool)
110 ("pkg-config" ,pkg-config)))
111 (home-page "https://transmissionbt.com/")
112 (synopsis "Fast and easy BitTorrent client")
114 "Transmission is a BitTorrent client that comes with graphical,
115 textual, and Web user interfaces. Transmission also has a daemon for
116 unattended operations. It supports local peer discovery, full encryption,
117 DHT, µTP, PEX and Magnet Links.")
121 ;; Transmission can be redistributed and/or modified under the terms of
122 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
123 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
124 ;; or any future license endorsed by Mnemosyne LLC.
126 ;; A few files files carry an MIT/X11 license header.
127 (license (list l:gpl2 l:gpl3))))
129 (define-public libtorrent
136 "http://rtorrent.net/downloads/libtorrent-"
140 "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd"))))
141 (build-system gnu-build-system)
142 (inputs `(("openssl" ,openssl)
144 (native-inputs `(("pkg-config" ,pkg-config)
145 ("cppunit" ,cppunit)))
146 (synopsis "BitTorrent library of rtorrent")
148 "LibTorrent is a BitTorrent library used by and developed in parallel
149 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
150 speed and efficiency.")
151 (home-page "https://github.com/rakshasa/libtorrent")
154 (define-public rtorrent
161 "http://rtorrent.net/downloads/rtorrent-"
165 "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy"))))
166 (build-system gnu-build-system)
167 (inputs `(("libtorrent" ,libtorrent)
170 ("cyrus-sasl" ,cyrus-sasl)
173 (native-inputs `(("pkg-config" ,pkg-config)
174 ("cppunit" ,cppunit)))
175 (synopsis "BitTorrent client with ncurses interface")
177 "rTorrent is a BitTorrent client with an ncurses interface. It supports
178 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
180 (home-page "https://github.com/rakshasa/rtorrent")
191 (url "https://github.com/tremc/tremc")
193 (file-name (git-file-name name version))
196 "1fqspp2ckafplahgba54xmx0sjidx1pdzyjaqjhz0ivh98dkx2n5"))))
197 (build-system gnu-build-system)
199 `(#:tests? #f ; no test suite
201 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
203 (modify-phases %standard-phases
204 ;; The software is just a Python script that must be copied into place.
208 `(("python" ,python)))
209 (synopsis "Console client for the Transmission BitTorrent daemon")
210 (description "Tremc is a console client, with a curses interface, for the
211 Transmission BitTorrent daemon.")
212 (home-page "https://github.com/tremc/tremc")
215 (define-public transmission-remote-cli
217 (name "transmission-remote-cli")
222 (url "https://github.com/fagga/transmission-remote-cli")
223 (commit (string-append "v" version))))
224 (file-name (git-file-name name version))
227 "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
228 (build-system python-build-system)
230 `(#:python ,python-2 ; only supports Python 2
231 #:tests? #f ; no test suite
232 #:phases (modify-phases %standard-phases
233 ;; The software is just a Python script that must be
234 ;; copied into place.
237 (lambda* (#:key outputs #:allow-other-keys)
238 (let* ((out (assoc-ref outputs "out"))
239 (bin (string-append out "/bin"))
240 (man (string-append out "/share/man/man1"))
241 ;; FIXME install zsh completions
242 (completions (string-append out "/etc/bash_completion.d")))
243 (install-file "transmission-remote-cli" bin)
244 (install-file "transmission-remote-cli.1" man)
248 "transmission-remote-cli-bash-completion.sh")
250 (synopsis "Console client for the Transmission BitTorrent daemon")
251 (description "Transmission-remote-cli is a console client, with a curses
252 interface, for the Transmission BitTorrent daemon. This package is no longer
253 maintained upstream.")
254 (home-page "https://github.com/fagga/transmission-remote-cli")
256 (properties `((superseded . ,tremc)))))
264 (uri (string-append "https://github.com/aria2/aria2/releases/"
265 "download/release-" version
266 "/aria2-" version ".tar.xz"))
269 "1zbxc517d97lb96f15xcy4l7b66grxrp3h2ids2jiwkaip87yaqy"))))
270 (build-system gnu-build-system)
272 `(#:configure-flags (list "--enable-libaria2"
273 (string-append "--with-bashcompletiondir="
274 %output "/etc/bash_completion.d/"))
276 (modify-phases %standard-phases
277 (add-after 'unpack 'delete-socket-tests
279 (substitute* "test/LpdMessageDispatcherTest.cc"
280 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
281 (string-append "// " text)))
282 (substitute* "test/LpdMessageReceiverTest.cc"
283 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
284 (string-append "// " text)))
287 `(("cppunit" ,cppunit) ; for the tests
288 ("pkg-config" ,pkg-config)))
298 (home-page "https://aria2.github.io/")
299 (synopsis "Utility for parallel downloading files")
301 "Aria2 is a lightweight, multi-protocol & multi-source command-line
302 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
303 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
313 (uri (string-append "mirror://sourceforge/urlget/"
314 "uget%20%28stable%29/" version "/uget-"
317 (base32 "0rg2mr2cndxvnjib8zm5dp7y2hgbvnqkz2j2jmg0xlzfh9d34b2m"))))
318 (build-system gnu-build-system)
324 ("gstreamer" ,gstreamer)
325 ("libgcrypt" ,libgcrypt)
326 ("libnotify" ,libnotify)
327 ("openssl" ,openssl)))
329 `(("intltool" ,intltool)
330 ("pkg-config" ,pkg-config)))
331 (home-page "https://ugetdm.com/")
332 (synopsis "Universal download manager with GTK+ interface")
334 "uGet is portable download manager with GTK+ interface supporting
335 HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
336 downloads, download scheduling, download rate limiting.")
337 (license l:lgpl2.1+)))
339 (define-public mktorrent
346 (url "https://github.com/Rudde/mktorrent")
347 (commit (string-append "v" version))))
348 (file-name (git-file-name name version))
351 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
352 (build-system gnu-build-system)
354 `(#:phases (modify-phases %standard-phases
355 (delete 'configure)) ; no configure script
356 #:make-flags (list "CC=gcc"
357 (string-append "PREFIX=" (assoc-ref %outputs "out"))
362 #:tests? #f)) ; no tests
363 (home-page "https://github.com/Rudde/mktorrent")
364 (synopsis "Utility to create BitTorrent metainfo files")
366 "mktorrent is a simple command-line utility to create BitTorrent
367 @dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
368 files and whole directories. It can add multiple trackers and web seed URLs,
369 and set the @code{private} flag to disallow advertisement through the
370 distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
371 and will take advantage of multiple processor cores where possible.")
372 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
373 l:gpl2+)))) ; with permission to link with OpenSSL
375 (define-public libtorrent-rasterbar
377 (name "libtorrent-rasterbar")
383 "https://github.com/arvidn/libtorrent/releases/download/libtorrent_"
384 (string-join (string-split version #\.) "_")
385 "/libtorrent-rasterbar-" version ".tar.gz"))
388 "001g35janbxi20c7jzsf3ii9mkagz4kdsp7f3sz5r0n0cng0c05w"))))
389 (build-system gnu-build-system)
392 (list (string-append "--with-boost-libdir="
393 (assoc-ref %build-inputs "boost")
395 "--enable-python-binding"
398 (string-append "LDFLAGS=-Wl,-rpath="
399 (assoc-ref %outputs "out") "/lib"))))
400 (inputs `(("boost" ,boost)
401 ("openssl" ,openssl)))
402 (native-inputs `(("python" ,python-wrapper)
403 ("pkg-config" ,pkg-config)))
404 (home-page "https://www.libtorrent.org/")
405 (synopsis "Feature complete BitTorrent implementation")
407 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
408 focusing on efficiency and scalability. It runs on embedded devices as well as
412 (define-public qbittorrent
420 (url "https://github.com/qbittorrent/qBittorrent")
421 (commit (string-append "release-" version))))
422 (file-name (git-file-name name version))
424 (base32 "1n613ylg6i9gisgk0dbr2kpfasyizrkdjff1r8smd4vri2qrdksn"))))
425 (build-system gnu-build-system)
428 (list (string-append "--with-boost-libdir="
429 (assoc-ref %build-inputs "boost")
432 "QMAKE_LRELEASE=lrelease")
433 #:modules ((guix build gnu-build-system)
434 (guix build qt-utils)
436 #:imported-modules (,@%gnu-build-system-modules
437 (guix build qt-utils))
439 (modify-phases %standard-phases
440 (add-after 'install 'wrap-qt
441 (lambda* (#:key outputs #:allow-other-keys)
442 (wrap-qt-program (assoc-ref outputs "out") "qbittorrent")
445 `(("pkg-config" ,pkg-config)
446 ("qttools" ,qttools)))
449 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
451 ("python" ,python-wrapper)
455 (home-page "https://www.qbittorrent.org/")
456 (synopsis "Graphical BitTorrent client")
458 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
459 libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
461 It aims to be a good alternative to all other BitTorrent clients out there.
462 qBittorrent is fast, stable and provides unicode support as well as many
466 (define-public deluge
474 "http://download.deluge-torrent.org/source/deluge-"
478 "0b7rri4x0wrcj7rjghrnw1kfrsd5i7i6aq85dsg5dg1w1qa0ar59"))))
479 (build-system python-build-system)
481 `(("libtorrent" ,libtorrent-rasterbar)
482 ("python2-chardet" ,python2-chardet)
483 ("python2-pygtk" ,python2-pygtk)
484 ("python2-pyopenssl" ,python2-pyopenssl)
485 ("python2-pyxdg" ,python2-pyxdg)
486 ("python2-service-identity" ,python2-service-identity)
487 ("python2-twisted" ,python2-twisted)))
489 `(("intltool" ,intltool)))
491 `(#:python ,python-2))
492 (home-page "https://www.deluge-torrent.org/")
493 (synopsis "Fully-featured cross-platform BitTorrent client")
495 "Deluge contains the common features to BitTorrent clients such as
496 Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
497 (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
498 speed limits. Deluge heavily utilises the libtorrent library. It is
499 designed to run as both a normal standalone desktop application and as a