gnu: uget: Remove duplicate 'native-inputs' field.
[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, 2018 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
6 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
8 ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
10 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
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)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system python)
33 #:use-module (guix build-system glib-or-gtk)
34 #:use-module ((guix licenses) #:prefix l:)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages adns)
37 #:use-module (gnu packages boost)
38 #:use-module (gnu packages check)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages crypto)
41 #:use-module (gnu packages curl)
42 #:use-module (gnu packages cyrus-sasl)
43 #:use-module (gnu packages databases)
44 #:use-module (gnu packages file)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gnupg)
48 #:use-module (gnu packages gstreamer)
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages libevent)
51 #:use-module (gnu packages linux)
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 qt)
58 #:use-module (gnu packages ssh)
59 #:use-module (gnu packages tls)
60 #:use-module (gnu packages xml))
61
62 (define-public transmission
63 (package
64 (name "transmission")
65 (version "2.93")
66 (source (origin
67 (method url-fetch)
68 (uri (string-append
69 "https://github.com/transmission/transmission-releases/raw/"
70 "master/transmission-" version ".tar.xz"))
71 (sha256
72 (base32
73 "02xrp49gsv4jkbzp37qrwlnb9nlja08s92dyvgdbr6a4187945c8"))))
74 (build-system glib-or-gtk-build-system)
75 (outputs '("out" ; library and command-line interface
76 "gui")) ; graphical user interface
77 (arguments
78 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
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"))
91
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)))))
97 (inputs
98 `(("inotify-tools" ,inotify-tools)
99 ("libevent" ,libevent)
100 ("curl" ,curl)
101 ("cyrus-sasl" ,cyrus-sasl)
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,
113 textual, and Web user interfaces. Transmission also has a daemon for
114 unattended operations. It supports local peer discovery, full encryption,
115 DHT, µ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+)))
126
127 (define-public libtorrent
128 (package
129 (name "libtorrent")
130 (version "0.13.6")
131 (source (origin
132 (method url-fetch)
133 (uri (string-append
134 "http://rtorrent.net/downloads/libtorrent-"
135 version ".tar.gz"))
136 (sha256
137 (base32
138 "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
139 (build-system gnu-build-system)
140 (inputs `(("openssl" ,openssl)
141 ("zlib" ,zlib)))
142 (native-inputs `(("pkg-config" ,pkg-config)
143 ("cppunit" ,cppunit)))
144 (synopsis "BitTorrent library of rtorrent")
145 (description
146 "LibTorrent is a BitTorrent library used by and developed in parallel
147 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
148 speed and efficiency.")
149 (home-page "https://github.com/rakshasa/libtorrent")
150 (license l:gpl2+)))
151
152 (define-public rtorrent
153 (package
154 (name "rtorrent")
155 (version "0.9.6")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append
159 "http://rtorrent.net/downloads/rtorrent-"
160 version ".tar.gz"))
161 (sha256
162 (base32
163 "03jvzw9pi2mhcm913h8qg0qw9gwjqc6lhwynb1yz1y163x7w4s8y"))))
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
176 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
177 XML-RPC over SCGI.")
178 (home-page "https://github.com/rakshasa/rtorrent")
179 (license l:gpl2+)))
180
181 (define-public tremc
182 (let ((commit "e06d08d8d76aa0559593ffc1188f4a90100cdbdb")
183 (revision "2"))
184 (package
185 (name "tremc")
186 (version (git-version "0.9.0" revision commit))
187 (source
188 (origin
189 (method git-fetch)
190 (uri (git-reference
191 (url "https://github.com/louipc/tremc.git")
192 (commit commit)))
193 (file-name (git-file-name name version))
194 (sha256
195 (base32
196 "17rf74sajcn5fl718rgl2qk5mw5yz9hrh58hbcg4p55wrazzrm1i"))))
197 (build-system gnu-build-system)
198 (arguments
199 `(#:tests? #f ; no test suite
200 #:make-flags
201 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
202 #:phases
203 (modify-phases %standard-phases
204 ;; The software is just a Python script that must be copied into
205 ;; place.
206 (delete 'configure)
207 (delete 'build))))
208 (synopsis "Console client for the Transmission BitTorrent daemon")
209 (description "Tremc is a console client, with a curses interface, for the
210 Transmission BitTorrent daemon.")
211 (home-page "https://github.com/louipc/tremc")
212 (license l:gpl3+))))
213
214 (define-public transmission-remote-cli
215 (package
216 (name "transmission-remote-cli")
217 (version "1.7.1")
218 (source (origin
219 (method url-fetch)
220 (uri (string-append "https://github.com/fagga/"
221 "transmission-remote-cli/archive/v"
222 version ".tar.gz"))
223 (file-name (string-append name "-" version ".tar.gz"))
224 (sha256
225 (base32
226 "1y0hkpcjf6jw9xig8yf484hbhy63nip0pkchx401yxj81m25l4z9"))))
227 (build-system python-build-system)
228 (arguments
229 `(#:python ,python-2 ; only supports Python 2
230 #:tests? #f ; no test suite
231 #:phases (modify-phases %standard-phases
232 ;; The software is just a Python script that must be
233 ;; copied into place.
234 (delete 'build)
235 (replace 'install
236 (lambda* (#:key outputs #:allow-other-keys)
237 (let* ((out (assoc-ref outputs "out"))
238 (bin (string-append out "/bin"))
239 (man (string-append out "/share/man/man1"))
240 ;; FIXME install zsh completions
241 (completions (string-append out "/etc/bash_completion.d")))
242 (install-file "transmission-remote-cli" bin)
243 (install-file "transmission-remote-cli.1" man)
244 (install-file
245 (string-append
246 "completion/bash/"
247 "transmission-remote-cli-bash-completion.sh")
248 completions)))))))
249 (synopsis "Console client for the Transmission BitTorrent daemon")
250 (description "Transmission-remote-cli is a console client, with a curses
251 interface, for the Transmission BitTorrent daemon. This package is no longer
252 maintained upstream.")
253 (home-page "https://github.com/fagga/transmission-remote-cli")
254 (license l:gpl3+)
255 (properties `((superseded . ,tremc)))))
256
257 (define-public aria2
258 (package
259 (name "aria2")
260 (version "1.33.1")
261 (source (origin
262 (method url-fetch)
263 (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
264 "releases/download/release-" version "/"
265 name "-" version ".tar.xz"))
266 (sha256
267 (base32
268 "06syqxia701dk96rcbhnd4x0arjj6d22gm3aqksz38am9y2f8f95"))))
269 (build-system gnu-build-system)
270 (arguments
271 `(#:configure-flags (list "--enable-libaria2"
272 (string-append "--with-bashcompletiondir="
273 %output "/etc/bash_completion.d/"))
274 #:phases
275 (modify-phases %standard-phases
276 (add-after 'unpack 'delete-socket-tests
277 (lambda _
278 (substitute* "test/LpdMessageDispatcherTest.cc"
279 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
280 (string-append "// " text)))
281 (substitute* "test/LpdMessageReceiverTest.cc"
282 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
283 (string-append "// " text)))
284 #t)))))
285 (native-inputs
286 `(("cppunit" ,cppunit) ; for the tests
287 ("pkg-config" ,pkg-config)))
288 (inputs
289 `(("c-ares" ,c-ares)
290 ("gnutls" ,gnutls)
291 ("gmp" ,gmp)
292 ("libssh2" ,libssh2)
293 ("libxml2" ,libxml2)
294 ("nettle" ,nettle)
295 ("sqlite" ,sqlite)
296 ("zlib" ,zlib)))
297 (home-page "https://aria2.github.io/")
298 (synopsis "Utility for parallel downloading files")
299 (description
300 "Aria2 is a lightweight, multi-protocol & multi-source command-line
301 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
302 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
303 (license l:gpl2+)))
304
305 (define-public uget
306 (package
307 (name "uget")
308 (version "2.0.8")
309 (source (origin
310 (method url-fetch)
311 (uri (string-append "mirror://sourceforge/urlget/"
312 "uget%20%28stable%29/" version "/uget-"
313 version ".tar.gz"))
314 (sha256
315 (base32
316 "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
317 (build-system gnu-build-system)
318 (inputs
319 `(("curl" ,curl)
320 ("gtk+" ,gtk+)
321 ("glib" ,glib)
322 ("gnutls" ,gnutls)
323 ("gstreamer" ,gstreamer)
324 ("libgcrypt" ,libgcrypt)
325 ("libnotify" ,libnotify)
326 ("openssl" ,openssl)))
327 (native-inputs
328 `(("intltool" ,intltool)
329 ("pkg-config" ,pkg-config)))
330 (home-page "http://ugetdm.com/")
331 (synopsis "Universal download manager with GTK+ interface")
332 (description
333 "uGet is portable download manager with GTK+ interface supporting
334 HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
335 downloads, download scheduling, download rate limiting.")
336 (license l:lgpl2.1+)))
337
338 (define-public mktorrent
339 (package
340 (name "mktorrent")
341 (version "1.1")
342 (source (origin
343 (method url-fetch)
344 (file-name (string-append name "-" version ".tar.gz"))
345 (uri (string-append "https://github.com/Rudde/mktorrent/archive/v"
346 version ".tar.gz"))
347 (sha256
348 (base32
349 "1j9qc4fxa9isnaygqk6jazsiklqywl2wcs95b8dx01963407bx6h"))))
350 (build-system gnu-build-system)
351 (arguments
352 `(#:phases (modify-phases %standard-phases
353 (delete 'configure)) ; no configure script
354 #:make-flags (list "CC=gcc"
355 (string-append "PREFIX=" (assoc-ref %outputs "out"))
356 "NO_HASH_CHECK=1"
357 "USE_LARGE_FILES=1"
358 "USE_LONG_OPTIONS=1"
359 "USE_PTHREADS=1")
360 #:tests? #f)) ; no tests
361 (home-page "https://github.com/Rudde/mktorrent")
362 (synopsis "Utility to create BitTorrent metainfo files")
363 (description
364 "mktorrent is a simple command-line utility to create BitTorrent
365 @dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
366 files and whole directories. It can add multiple trackers and web seed URLs,
367 and set the @code{private} flag to disallow advertisement through the
368 distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
369 and will take advantage of multiple processor cores where possible.")
370 (license (list l:public-domain ; sha1.*, used to build without OpenSSL
371 l:gpl2+)))) ; with permission to link with OpenSSL
372
373 (define-public libtorrent-rasterbar
374 (package
375 (name "libtorrent-rasterbar")
376 (version "1.1.7")
377 (source (origin
378 (method url-fetch)
379 (uri
380 (string-append
381 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
382 (string-join (string-split version #\.) "_")
383 "/libtorrent-rasterbar-" version ".tar.gz"))
384 (sha256
385 (base32
386 "1agkcyjs7xscx4sgkg2ri4nm4v736xsg3br2v8jcrph86dlbycw1"))))
387 (build-system gnu-build-system)
388 (arguments
389 `(#:configure-flags
390 (list (string-append "--with-boost-libdir="
391 (assoc-ref %build-inputs "boost")
392 "/lib")
393 "--enable-python-binding"
394 "--enable-tests"
395 "CXXFLAGS=-std=c++11") ; Use std::chrono instead of boost
396 #:make-flags (list
397 (string-append "LDFLAGS=-Wl,-rpath="
398 (assoc-ref %outputs "out") "/lib"))))
399 (inputs `(("boost" ,boost)
400 ("openssl" ,openssl)))
401 (native-inputs `(("python" ,python-2)
402 ("pkg-config" ,pkg-config)))
403 (home-page "https://www.libtorrent.org/")
404 (synopsis "Feature complete BitTorrent implementation")
405 (description
406 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
407 focusing on efficiency and scalability. It runs on embedded devices as well as
408 desktops.")
409 (license l:bsd-2)))
410
411 (define-public qbittorrent
412 (package
413 (name "qbittorrent")
414 (version "4.0.4")
415 (source (origin
416 (method url-fetch)
417 (uri (string-append
418 "https://github.com/qbittorrent/qBittorrent/archive/release-"
419 version ".tar.gz"))
420 (file-name (string-append name "-release-" version ".tar.gz"))
421 (sha256
422 (base32
423 "145r4lv7rqdhrm5znn3ndxsfdf579n46zvj7c53c422am8ir5xhp"))))
424 (build-system gnu-build-system)
425 (arguments
426 `(#:configure-flags
427 (list (string-append "--with-boost-libdir="
428 (assoc-ref %build-inputs "boost")
429 "/lib")
430 "--enable-debug"
431 "QMAKE_LRELEASE=lrelease")))
432 (native-inputs
433 `(("pkg-config" ,pkg-config)
434 ("qttools" ,qttools)))
435 (inputs
436 `(("boost" ,boost)
437 ("libtorrent-rasterbar" ,libtorrent-rasterbar)
438 ("openssl" ,openssl)
439 ("python" ,python)
440 ("qtbase" ,qtbase)
441 ("qtsvg" ,qtsvg)
442 ("zlib" ,zlib)))
443 (home-page "https://www.qbittorrent.org/")
444 (synopsis "Graphical BitTorrent client")
445 (description
446 "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
447 libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
448
449 It aims to be a good alternative to all other BitTorrent clients out there.
450 qBittorrent is fast, stable and provides unicode support as well as many
451 features.")
452 (license l:gpl2+)))