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