Merge branch 'core-updates'
[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 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages bittorrent)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system python)
27 #:use-module (guix build-system glib-or-gtk)
28 #:use-module ((guix licenses) #:prefix l:)
29 #:use-module (gnu packages adns)
30 #:use-module (gnu packages check)
31 #:use-module (gnu packages compression)
32 #:use-module (gnu packages curl)
33 #:use-module (gnu packages cyrus-sasl)
34 #:use-module (gnu packages databases)
35 #:use-module (gnu packages file)
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages libevent)
39 #:use-module (gnu packages linux)
40 #:use-module (gnu packages multiprecision)
41 #:use-module (gnu packages nettle)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages ssh)
46 #:use-module (gnu packages tls)
47 #:use-module (gnu packages xml))
48
49 (define-public transmission
50 (package
51 (name "transmission")
52 (version "2.84")
53 (source (origin
54 (method url-fetch)
55 (uri (string-append
56 "https://transmission.cachefly.net/transmission-"
57 version ".tar.xz"))
58 (sha256
59 (base32
60 "1sxr1magqb5s26yvr5yhs1f7bmir8gl09niafg64lhgfnhv1kz59"))))
61 (build-system glib-or-gtk-build-system)
62 (outputs '("out" ; library and command-line interface
63 "gui")) ; graphical user interface
64 (arguments
65 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
66 #:phases (alist-cons-after
67 'install 'move-gui
68 (lambda* (#:key outputs #:allow-other-keys)
69 ;; Move the GUI to its own output, so that "out" doesn't
70 ;; depend on GTK+.
71 (let ((out (assoc-ref outputs "out"))
72 (gui (assoc-ref outputs "gui")))
73 (mkdir-p (string-append gui "/bin"))
74 (rename-file (string-append out "/bin/transmission-gtk")
75 (string-append gui
76 "/bin/transmission-gtk"))))
77 %standard-phases)))
78 (inputs
79 `(("inotify-tools" ,inotify-tools)
80 ("libevent" ,libevent)
81 ("curl" ,curl)
82 ("openssl" ,openssl)
83 ("file" ,file)
84 ("zlib" ,zlib)
85 ("gtk+" ,gtk+)))
86 (native-inputs
87 `(("intltool" ,intltool)
88 ("pkg-config" ,pkg-config)))
89 (home-page "http://www.transmissionbt.com/")
90 (synopsis "Fast and easy BitTorrent client")
91 (description
92 "Transmission is a BitTorrent client that comes with graphical,
93 textual, and Web user interfaces. Transmission also has a daemon for
94 unattended operations. It supports local peer discovery, full encryption,
95 DHT, µTP, PEX and Magnet Links.")
96
97 ;; COPYING reads:
98 ;;
99 ;; Transmission can be redistributed and/or modified under the terms of
100 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
101 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
102 ;; or any future license endorsed by Mnemosyne LLC.
103 ;;
104 ;; A few files files carry an MIT/X11 license header.
105 (license l:gpl3+)))
106
107 (define-public libtorrent
108 (package
109 (name "libtorrent")
110 (version "0.13.6")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append
114 "http://rtorrent.net/downloads/libtorrent-"
115 version ".tar.gz"))
116 (sha256
117 (base32
118 "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
119 (build-system gnu-build-system)
120 (inputs `(("openssl" ,openssl)
121 ("zlib" ,zlib)))
122 (native-inputs `(("pkg-config" ,pkg-config)
123 ("cppunit" ,cppunit)))
124 (synopsis "BitTorrent library of rtorrent")
125 (description
126 "LibTorrent is a BitTorrent library used by and developed in parallel
127 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
128 speed and efficiency.")
129 (home-page "https://github.com/rakshasa/libtorrent")
130 (license l:gpl2+)))
131
132 (define-public rtorrent
133 (package
134 (name "rtorrent")
135 (version "0.9.6")
136 (source (origin
137 (method url-fetch)
138 (uri (string-append
139 "http://rtorrent.net/downloads/rtorrent-"
140 version ".tar.gz"))
141 (sha256
142 (base32
143 "03jvzw9pi2mhcm913h8qg0qw9gwjqc6lhwynb1yz1y163x7w4s8y"))))
144 (build-system gnu-build-system)
145 (inputs `(("libtorrent" ,libtorrent)
146 ("ncurses" ,ncurses)
147 ("curl" ,curl)
148 ("cyrus-sasl" ,cyrus-sasl)
149 ("openssl" ,openssl)
150 ("zlib" ,zlib)))
151 (native-inputs `(("pkg-config" ,pkg-config)
152 ("cppunit" ,cppunit)))
153 (synopsis "BitTorrent client with ncurses interface")
154 (description
155 "rTorrent is a BitTorrent client with an ncurses interface. It supports
156 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
157 XML-RPC over SCGI.")
158 (home-page "https://github.com/rakshasa/rtorrent")
159 (license l:gpl2+)))
160
161 (define-public transmission-remote-cli
162 (package
163 (name "transmission-remote-cli")
164 (version "1.7.1")
165 (source (origin
166 (method url-fetch)
167 (uri (string-append "https://github.com/fagga/"
168 "transmission-remote-cli/archive/v"
169 version ".tar.gz"))
170 (file-name (string-append name "-" version ".tar.gz"))
171 (sha256
172 (base32
173 "1y0hkpcjf6jw9xig8yf484hbhy63nip0pkchx401yxj81m25l4z9"))))
174 (build-system python-build-system)
175 (arguments
176 `(#:python ,python-2 ; only supports Python 2
177 #:tests? #f ; no test suite
178 #:phases (modify-phases %standard-phases
179 ;; The software is just a Python script that must be
180 ;; copied into place.
181 (delete 'build)
182 (replace 'install
183 (lambda* (#:key outputs #:allow-other-keys)
184 (let* ((out (assoc-ref outputs "out"))
185 (bin (string-append out "/bin"))
186 (man (string-append out "/share/man/man1"))
187 ;; FIXME install zsh completions
188 (completions (string-append out "/etc/bash_completion.d")))
189 (install-file "transmission-remote-cli" bin)
190 (install-file "transmission-remote-cli.1" man)
191 (install-file
192 (string-append
193 "completion/bash/"
194 "transmission-remote-cli-bash-completion.sh")
195 completions)))))))
196 (synopsis "Console client for the Transmission BitTorrent daemon")
197 (description "Transmission-remote-cli is a console client, with a curses
198 interface, for the Transmission BitTorrent daemon.")
199 (home-page "https://github.com/fagga/transmission-remote-cli")
200 (license l:gpl3+)))
201
202 (define-public aria2
203 (package
204 (name "aria2")
205 (version "1.19.3")
206 (source (origin
207 (method url-fetch)
208 (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
209 "releases/download/release-" version "/"
210 name "-" version ".tar.xz"))
211 (sha256
212 (base32
213 "1qwr4al6wlh5f558r0mr1hvdnf7d8ss6qwqn2361k99phk1cdg3a"))))
214 (build-system gnu-build-system)
215 (arguments
216 `(#:configure-flags '("--enable-libaria2")
217 #:phases
218 (modify-phases %standard-phases
219 (add-after 'unpack 'delete-socket-tests
220 (lambda _
221 (substitute* "test/LpdMessageDispatcherTest.cc"
222 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
223 (string-append "// " text)))
224 (substitute* "test/LpdMessageReceiverTest.cc"
225 (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
226 (string-append "// " text))))))))
227 (native-inputs
228 `(("pkg-config", pkg-config)))
229 (inputs
230 `(("c-ares" ,c-ares)
231 ("cppunit" ,cppunit) ; for the tests
232 ("gnutls" ,gnutls)
233 ("gmp" ,gmp)
234 ("libssh2" ,libssh2)
235 ("libxml2" ,libxml2)
236 ("nettle" ,nettle)
237 ("sqlite" ,sqlite)
238 ("zlib" ,zlib)))
239 (home-page "http://aria2.sourceforge.net/")
240 (synopsis "Utility for parallel downloading files")
241 (description
242 "Aria2 is a lightweight, multi-protocol & multi-source command-line
243 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
244 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
245 (license l:gpl2+)))