gnu: Add python-user-agents.
[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>
547c4bd2 4;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
e906f4e1 5;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
c9dbcd20 6;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
4b67098d 7;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
fd90e396 8;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4e58e9d0 9;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
f8fbe376 10;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
3963a729
LC
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages bittorrent)
28 #:use-module (guix packages)
29 #:use-module (guix download)
e906f4e1 30 #:use-module (guix git-download)
3963a729 31 #:use-module (guix build-system gnu)
feb767b2 32 #:use-module (guix build-system python)
4cdec09a 33 #:use-module (guix build-system glib-or-gtk)
b5b73a82 34 #:use-module ((guix licenses) #:prefix l:)
3c569804 35 #:use-module (gnu packages)
f66842dc 36 #:use-module (gnu packages adns)
4e58e9d0 37 #:use-module (gnu packages boost)
f66842dc
EF
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages compression)
4b67098d 40 #:use-module (gnu packages crypto)
3963a729 41 #:use-module (gnu packages curl)
f66842dc
EF
42 #:use-module (gnu packages cyrus-sasl)
43 #:use-module (gnu packages databases)
3963a729 44 #:use-module (gnu packages file)
3963a729 45 #:use-module (gnu packages glib)
4b67098d
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gnupg)
48 #:use-module (gnu packages gstreamer)
df66fee7 49 #:use-module (gnu packages gtk)
f66842dc
EF
50 #:use-module (gnu packages libevent)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages multiprecision)
53 #:use-module (gnu packages nettle)
2d8dc79c 54 #:use-module (gnu packages ncurses)
f66842dc 55 #:use-module (gnu packages pkg-config)
feb767b2 56 #:use-module (gnu packages python)
f8fbe376 57 #:use-module (gnu packages qt)
f66842dc
EF
58 #:use-module (gnu packages ssh)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages xml))
3963a729
LC
61
62(define-public transmission
63 (package
64 (name "transmission")
0aa23e02 65 (version "2.94")
3963a729
LC
66 (source (origin
67 (method url-fetch)
68 (uri (string-append
547c4bd2
LF
69 "https://github.com/transmission/transmission-releases/raw/"
70 "master/transmission-" version ".tar.xz"))
3963a729
LC
71 (sha256
72 (base32
0aa23e02 73 "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m"))))
4cdec09a 74 (build-system glib-or-gtk-build-system)
3963a729
LC
75 (outputs '("out" ; library and command-line interface
76 "gui")) ; graphical user interface
77 (arguments
4cdec09a 78 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
dc1d3cde
KK
79 #:phases
80 (modify-phases %standard-phases
81 (add-after 'install 'move-gui
82 (lambda* (#:key outputs #:allow-other-keys)
83 ;; Move the GUI to its own output, so that "out" doesn't
84 ;; depend on GTK+.
85 (let ((out (assoc-ref outputs "out"))
86 (gui (assoc-ref outputs "gui")))
87 (mkdir-p (string-append gui "/bin"))
88 (rename-file (string-append out "/bin/transmission-gtk")
89 (string-append gui
90 "/bin/transmission-gtk"))
07366434 91
dc1d3cde
KK
92 ;; Move the '.desktop' file as well.
93 (mkdir (string-append gui "/share"))
94 (rename-file (string-append out "/share/applications")
95 (string-append gui "/share/applications")))
96 #t)))))
3963a729
LC
97 (inputs
98 `(("inotify-tools" ,inotify-tools)
99 ("libevent" ,libevent)
100 ("curl" ,curl)
4f55441f 101 ("cyrus-sasl" ,cyrus-sasl)
3963a729
LC
102 ("openssl" ,openssl)
103 ("file" ,file)
104 ("zlib" ,zlib)
105 ("gtk+" ,gtk+)))
106 (native-inputs
107 `(("intltool" ,intltool)
108 ("pkg-config" ,pkg-config)))
109 (home-page "http://www.transmissionbt.com/")
110 (synopsis "Fast and easy BitTorrent client")
111 (description
112 "Transmission is a BitTorrent client that comes with graphical,
113textual, and Web user interfaces. Transmission also has a daemon for
e881752c 114unattended operations. It supports local peer discovery, full encryption,
3963a729
LC
115DHT, µTP, PEX and Magnet Links.")
116
117 ;; COPYING reads:
118 ;;
119 ;; Transmission can be redistributed and/or modified under the terms of
120 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
121 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
122 ;; or any future license endorsed by Mnemosyne LLC.
123 ;;
124 ;; A few files files carry an MIT/X11 license header.
125 (license l:gpl3+)))
df66fee7
LC
126
127(define-public libtorrent
128 (package
129 (name "libtorrent")
29b4c57b 130 (version "0.13.6")
df66fee7
LC
131 (source (origin
132 (method url-fetch)
133 (uri (string-append
29b4c57b 134 "http://rtorrent.net/downloads/libtorrent-"
df66fee7
LC
135 version ".tar.gz"))
136 (sha256
137 (base32
29b4c57b 138 "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
df66fee7
LC
139 (build-system gnu-build-system)
140 (inputs `(("openssl" ,openssl)
141 ("zlib" ,zlib)))
142 (native-inputs `(("pkg-config" ,pkg-config)
29b4c57b 143 ("cppunit" ,cppunit)))
df66fee7
LC
144 (synopsis "BitTorrent library of rtorrent")
145 (description
146 "LibTorrent is a BitTorrent library used by and developed in parallel
147with the BitTorrent client rtorrent. It is written in C++ with emphasis on
148speed and efficiency.")
9db04bf5 149 (home-page "https://github.com/rakshasa/libtorrent")
df66fee7 150 (license l:gpl2+)))
2d8dc79c
TUBK
151
152(define-public rtorrent
153 (package
154 (name "rtorrent")
9fbd458b 155 (version "0.9.6")
2d8dc79c
TUBK
156 (source (origin
157 (method url-fetch)
158 (uri (string-append
9fbd458b 159 "http://rtorrent.net/downloads/rtorrent-"
2d8dc79c
TUBK
160 version ".tar.gz"))
161 (sha256
162 (base32
9fbd458b 163 "03jvzw9pi2mhcm913h8qg0qw9gwjqc6lhwynb1yz1y163x7w4s8y"))))
2d8dc79c
TUBK
164 (build-system gnu-build-system)
165 (inputs `(("libtorrent" ,libtorrent)
166 ("ncurses" ,ncurses)
167 ("curl" ,curl)
168 ("cyrus-sasl" ,cyrus-sasl)
169 ("openssl" ,openssl)
170 ("zlib" ,zlib)))
171 (native-inputs `(("pkg-config" ,pkg-config)
172 ("cppunit" ,cppunit)))
173 (synopsis "BitTorrent client with ncurses interface")
174 (description
175 "rTorrent is a BitTorrent client with an ncurses interface. It supports
176full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
177XML-RPC over SCGI.")
9db04bf5 178 (home-page "https://github.com/rakshasa/rtorrent")
2d8dc79c 179 (license l:gpl2+)))
e906f4e1
LF
180
181(define-public tremc
96e2ecb7
TGR
182 (package
183 (name "tremc")
184 (version "0.9.1")
185 (source
186 (origin
187 (method git-fetch)
188 (uri (git-reference
a1225ae8 189 (url "https://github.com/tremc/tremc.git")
96e2ecb7
TGR
190 (commit version)))
191 (file-name (git-file-name name version))
192 (sha256
193 (base32 "1yhwvlcyv1s830p5a7q5x3mkb3mbvr5cn5nh7y62l5b6iyyynlvm"))))
194 (build-system gnu-build-system)
195 (arguments
196 `(#:tests? #f ; no test suite
197 #:make-flags
198 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
199 #:phases
200 (modify-phases %standard-phases
201 ;; The software is just a Python script that must be copied into place.
202 (delete 'configure)
203 (delete 'build))))
204 (inputs
205 `(("python" ,python)))
206 (synopsis "Console client for the Transmission BitTorrent daemon")
207 (description "Tremc is a console client, with a curses interface, for the
e906f4e1 208Transmission BitTorrent daemon.")
a1225ae8 209 (home-page "https://github.com/tremc/tremc")
96e2ecb7 210 (license l:gpl3+)))
feb767b2
LF
211
212(define-public transmission-remote-cli
213 (package
214 (name "transmission-remote-cli")
215 (version "1.7.1")
216 (source (origin
217 (method url-fetch)
218 (uri (string-append "https://github.com/fagga/"
219 "transmission-remote-cli/archive/v"
220 version ".tar.gz"))
221 (file-name (string-append name "-" version ".tar.gz"))
222 (sha256
223 (base32
224 "1y0hkpcjf6jw9xig8yf484hbhy63nip0pkchx401yxj81m25l4z9"))))
225 (build-system python-build-system)
226 (arguments
227 `(#:python ,python-2 ; only supports Python 2
228 #:tests? #f ; no test suite
229 #:phases (modify-phases %standard-phases
230 ;; The software is just a Python script that must be
231 ;; copied into place.
232 (delete 'build)
233 (replace 'install
234 (lambda* (#:key outputs #:allow-other-keys)
235 (let* ((out (assoc-ref outputs "out"))
236 (bin (string-append out "/bin"))
237 (man (string-append out "/share/man/man1"))
238 ;; FIXME install zsh completions
239 (completions (string-append out "/etc/bash_completion.d")))
240 (install-file "transmission-remote-cli" bin)
241 (install-file "transmission-remote-cli.1" man)
242 (install-file
243 (string-append
244 "completion/bash/"
245 "transmission-remote-cli-bash-completion.sh")
246 completions)))))))
247 (synopsis "Console client for the Transmission BitTorrent daemon")
248 (description "Transmission-remote-cli is a console client, with a curses
aaf111a2
LF
249interface, for the Transmission BitTorrent daemon. This package is no longer
250maintained upstream.")
feb767b2 251 (home-page "https://github.com/fagga/transmission-remote-cli")
aaf111a2
LF
252 (license l:gpl3+)
253 (properties `((superseded . ,tremc)))))
f66842dc
EF
254
255(define-public aria2
256 (package
257 (name "aria2")
c9dbcd20 258 (version "1.34.0")
f66842dc
EF
259 (source (origin
260 (method url-fetch)
261 (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
262 "releases/download/release-" version "/"
263 name "-" version ".tar.xz"))
264 (sha256
265 (base32
c9dbcd20 266 "18vpgr430vxlwbcc3598rr1srfmwypls6wp1m4wf21hncc1ahi1s"))))
f66842dc
EF
267 (build-system gnu-build-system)
268 (arguments
d2a7a145
EF
269 `(#:configure-flags (list "--enable-libaria2"
270 (string-append "--with-bashcompletiondir="
271 %output "/etc/bash_completion.d/"))
f66842dc
EF
272 #:phases
273 (modify-phases %standard-phases
274 (add-after 'unpack 'delete-socket-tests
275 (lambda _
276 (substitute* "test/LpdMessageDispatcherTest.cc"
277 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
278 (string-append "// " text)))
279 (substitute* "test/LpdMessageReceiverTest.cc"
280 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
9c64f76e
EF
281 (string-append "// " text)))
282 #t)))))
f66842dc 283 (native-inputs
5bed95ef
EF
284 `(("cppunit" ,cppunit) ; for the tests
285 ("pkg-config" ,pkg-config)))
f66842dc
EF
286 (inputs
287 `(("c-ares" ,c-ares)
f66842dc
EF
288 ("gnutls" ,gnutls)
289 ("gmp" ,gmp)
290 ("libssh2" ,libssh2)
291 ("libxml2" ,libxml2)
292 ("nettle" ,nettle)
293 ("sqlite" ,sqlite)
294 ("zlib" ,zlib)))
5bed95ef 295 (home-page "https://aria2.github.io/")
f66842dc
EF
296 (synopsis "Utility for parallel downloading files")
297 (description
298 "Aria2 is a lightweight, multi-protocol & multi-source command-line
299download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
300Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
301 (license l:gpl2+)))
4b67098d 302
4b67098d
303(define-public uget
304 (package
305 (name "uget")
306 (version "2.0.8")
307 (source (origin
308 (method url-fetch)
309 (uri (string-append "mirror://sourceforge/urlget/"
310 "uget%20%28stable%29/" version "/uget-"
311 version ".tar.gz"))
312 (sha256
313 (base32
314 "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
315 (build-system gnu-build-system)
4b67098d
316 (inputs
317 `(("curl" ,curl)
318 ("gtk+" ,gtk+)
319 ("glib" ,glib)
320 ("gnutls" ,gnutls)
321 ("gstreamer" ,gstreamer)
322 ("libgcrypt" ,libgcrypt)
323 ("libnotify" ,libnotify)
324 ("openssl" ,openssl)))
325 (native-inputs
c7ad32d9
EF
326 `(("intltool" ,intltool)
327 ("pkg-config" ,pkg-config)))
4b67098d
328 (home-page "http://ugetdm.com/")
329 (synopsis "Universal download manager with GTK+ interface")
330 (description
331 "uGet is portable download manager with GTK+ interface supporting
332HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
333downloads, download scheduling, download rate limiting.")
334 (license l:lgpl2.1+)))
8975d00c
TGR
335
336(define-public mktorrent
337 (package
338 (name "mktorrent")
fd90e396 339 (version "1.1")
8975d00c
TGR
340 (source (origin
341 (method url-fetch)
fd90e396
TGR
342 (file-name (string-append name "-" version ".tar.gz"))
343 (uri (string-append "https://github.com/Rudde/mktorrent/archive/v"
344 version ".tar.gz"))
8975d00c
TGR
345 (sha256
346 (base32
fd90e396 347 "1j9qc4fxa9isnaygqk6jazsiklqywl2wcs95b8dx01963407bx6h"))))
8975d00c
TGR
348 (build-system gnu-build-system)
349 (arguments
350 `(#:phases (modify-phases %standard-phases
351 (delete 'configure)) ; no configure script
352 #:make-flags (list "CC=gcc"
353 (string-append "PREFIX=" (assoc-ref %outputs "out"))
354 "NO_HASH_CHECK=1"
355 "USE_LARGE_FILES=1"
356 "USE_LONG_OPTIONS=1"
357 "USE_PTHREADS=1")
358 #:tests? #f)) ; no tests
fd90e396 359 (home-page "https://github.com/Rudde/mktorrent")
8975d00c 360 (synopsis "Utility to create BitTorrent metainfo files")
897bd0b5
TGR
361 (description
362 "mktorrent is a simple command-line utility to create BitTorrent
363@dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
364files and whole directories. It can add multiple trackers and web seed URLs,
365and set the @code{private} flag to disallow advertisement through the
366distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
8975d00c
TGR
367and will take advantage of multiple processor cores where possible.")
368 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
369 l:gpl2+)))) ; with permission to link with OpenSSL
4e58e9d0
JL
370
371(define-public libtorrent-rasterbar
372 (package
373 (name "libtorrent-rasterbar")
e967f726 374 (version "1.1.8")
4e58e9d0
JL
375 (source (origin
376 (method url-fetch)
377 (uri
378 (string-append
379 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
3c569804
MB
380 (string-join (string-split version #\.) "_")
381 "/libtorrent-rasterbar-" version ".tar.gz"))
4e58e9d0
JL
382 (sha256
383 (base32
e967f726 384 "0pcdy26l5ivcs78y2bqh2qca83ikzjfchw5815xh69qf8g88zgvb"))))
4e58e9d0
JL
385 (build-system gnu-build-system)
386 (arguments
387 `(#:configure-flags
388 (list (string-append "--with-boost-libdir="
389 (assoc-ref %build-inputs "boost")
390 "/lib")
391 "--enable-python-binding"
395541b0
FT
392 "--enable-tests"
393 "CXXFLAGS=-std=c++11") ; Use std::chrono instead of boost
4e58e9d0
JL
394 #:make-flags (list
395 (string-append "LDFLAGS=-Wl,-rpath="
396 (assoc-ref %outputs "out") "/lib"))))
397 (inputs `(("boost" ,boost)
398 ("openssl" ,openssl)))
399 (native-inputs `(("python" ,python-2)
400 ("pkg-config" ,pkg-config)))
9270b2fb 401 (home-page "https://www.libtorrent.org/")
4e58e9d0
JL
402 (synopsis "Feature complete BitTorrent implementation")
403 (description
404 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
405focusing on efficiency and scalability. It runs on embedded devices as well as
406desktops.")
407 (license l:bsd-2)))
408
f8fbe376
FT
409(define-public qbittorrent
410 (package
411 (name "qbittorrent")
412 (version "4.0.4")
413 (source (origin
414 (method url-fetch)
415 (uri (string-append
416 "https://github.com/qbittorrent/qBittorrent/archive/release-"
417 version ".tar.gz"))
418 (file-name (string-append name "-release-" version ".tar.gz"))
419 (sha256
420 (base32
421 "145r4lv7rqdhrm5znn3ndxsfdf579n46zvj7c53c422am8ir5xhp"))))
422 (build-system gnu-build-system)
423 (arguments
424 `(#:configure-flags
425 (list (string-append "--with-boost-libdir="
426 (assoc-ref %build-inputs "boost")
427 "/lib")
428 "--enable-debug"
429 "QMAKE_LRELEASE=lrelease")))
430 (native-inputs
431 `(("pkg-config" ,pkg-config)
432 ("qttools" ,qttools)))
433 (inputs
434 `(("boost" ,boost)
435 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
436 ("openssl" ,openssl)
437 ("python" ,python)
438 ("qtbase" ,qtbase)
439 ("qtsvg" ,qtsvg)
440 ("zlib" ,zlib)))
441 (home-page "https://www.qbittorrent.org/")
442 (synopsis "Graphical BitTorrent client")
443 (description
444 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
445libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
4e58e9d0 446
f8fbe376
FT
447It aims to be a good alternative to all other BitTorrent clients out there.
448qBittorrent is fast, stable and provides unicode support as well as many
449features.")
450 (license l:gpl2+)))