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>
11 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)
35 #:use-module (gnu packages adns)
36 #:use-module (gnu packages boost)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages crypto)
40 #:use-module (gnu packages curl)
41 #:use-module (gnu packages cyrus-sasl)
42 #:use-module (gnu packages databases)
43 #:use-module (gnu packages file)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gnome)
46 #:use-module (gnu packages gnupg)
47 #:use-module (gnu packages gstreamer)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages libevent)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages multiprecision)
52 #:use-module (gnu packages nettle)
53 #:use-module (gnu packages ncurses)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages ssh)
57 #:use-module (gnu packages tls)
58 #:use-module (gnu packages xml))
60 (define-public transmission
67 "https://github.com/transmission/transmission-releases/raw/"
68 "master/transmission-" version ".tar.xz"))
71 "02xrp49gsv4jkbzp37qrwlnb9nlja08s92dyvgdbr6a4187945c8"))))
72 (build-system glib-or-gtk-build-system)
73 (outputs '("out" ; library and command-line interface
74 "gui")) ; graphical user interface
76 '(#:glib-or-gtk-wrap-excluded-outputs '("out")
78 (modify-phases %standard-phases
79 (add-after 'install 'move-gui
80 (lambda* (#:key outputs #:allow-other-keys)
81 ;; Move the GUI to its own output, so that "out" doesn't
83 (let ((out (assoc-ref outputs "out"))
84 (gui (assoc-ref outputs "gui")))
85 (mkdir-p (string-append gui "/bin"))
86 (rename-file (string-append out "/bin/transmission-gtk")
88 "/bin/transmission-gtk"))
90 ;; Move the '.desktop' file as well.
91 (mkdir (string-append gui "/share"))
92 (rename-file (string-append out "/share/applications")
93 (string-append gui "/share/applications")))
96 `(("inotify-tools" ,inotify-tools)
97 ("libevent" ,libevent)
99 ("cyrus-sasl" ,cyrus-sasl)
105 `(("intltool" ,intltool)
106 ("pkg-config" ,pkg-config)))
107 (home-page "http://www.transmissionbt.com/")
108 (synopsis "Fast and easy BitTorrent client")
110 "Transmission is a BitTorrent client that comes with graphical,
111 textual, and Web user interfaces. Transmission also has a daemon for
112 unattended operations. It supports local peer discovery, full encryption,
113 DHT, µTP, PEX and Magnet Links.")
117 ;; Transmission can be redistributed and/or modified under the terms of
118 ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
119 ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
120 ;; or any future license endorsed by Mnemosyne LLC.
122 ;; A few files files carry an MIT/X11 license header.
125 (define-public libtorrent
132 "http://rtorrent.net/downloads/libtorrent-"
136 "012s1nwcvz5m5r4d2z9klgy2n34kpgn9kgwgzxm97zgdjs6a0f18"))))
137 (build-system gnu-build-system)
138 (inputs `(("openssl" ,openssl)
140 (native-inputs `(("pkg-config" ,pkg-config)
141 ("cppunit" ,cppunit)))
142 (synopsis "BitTorrent library of rtorrent")
144 "LibTorrent is a BitTorrent library used by and developed in parallel
145 with the BitTorrent client rtorrent. It is written in C++ with emphasis on
146 speed and efficiency.")
147 (home-page "https://github.com/rakshasa/libtorrent")
150 (define-public rtorrent
157 "http://rtorrent.net/downloads/rtorrent-"
161 "03jvzw9pi2mhcm913h8qg0qw9gwjqc6lhwynb1yz1y163x7w4s8y"))))
162 (build-system gnu-build-system)
163 (inputs `(("libtorrent" ,libtorrent)
166 ("cyrus-sasl" ,cyrus-sasl)
169 (native-inputs `(("pkg-config" ,pkg-config)
170 ("cppunit" ,cppunit)))
171 (synopsis "BitTorrent client with ncurses interface")
173 "rTorrent is a BitTorrent client with an ncurses interface. It supports
174 full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
176 (home-page "https://github.com/rakshasa/rtorrent")
180 (let ((commit "e06d08d8d76aa0559593ffc1188f4a90100cdbdb")
184 (version (git-version "0.9.0" revision commit))
189 (url "https://github.com/louipc/tremc.git")
191 (file-name (git-file-name name version))
194 "17rf74sajcn5fl718rgl2qk5mw5yz9hrh58hbcg4p55wrazzrm1i"))))
195 (build-system gnu-build-system)
197 `(#:tests? #f ; no test suite
199 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
201 (modify-phases %standard-phases
202 ;; The software is just a Python script that must be copied into
206 (synopsis "Console client for the Transmission BitTorrent daemon")
207 (description "Tremc is a console client, with a curses interface, for the
208 Transmission BitTorrent daemon.")
209 (home-page "https://github.com/louipc/tremc")
212 (define-public transmission-remote-cli
214 (name "transmission-remote-cli")
218 (uri (string-append "https://github.com/fagga/"
219 "transmission-remote-cli/archive/v"
221 (file-name (string-append name "-" version ".tar.gz"))
224 "1y0hkpcjf6jw9xig8yf484hbhy63nip0pkchx401yxj81m25l4z9"))))
225 (build-system python-build-system)
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.
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)
245 "transmission-remote-cli-bash-completion.sh")
247 (synopsis "Console client for the Transmission BitTorrent daemon")
248 (description "Transmission-remote-cli is a console client, with a curses
249 interface, for the Transmission BitTorrent daemon. This package is no longer
250 maintained upstream.")
251 (home-page "https://github.com/fagga/transmission-remote-cli")
253 (properties `((superseded . ,tremc)))))
261 (uri (string-append "https://github.com/tatsuhiro-t/aria2/"
262 "releases/download/release-" version "/"
263 name "-" version ".tar.xz"))
266 "06syqxia701dk96rcbhnd4x0arjj6d22gm3aqksz38am9y2f8f95"))))
267 (build-system gnu-build-system)
269 `(#:configure-flags (list "--enable-libaria2"
270 (string-append "--with-bashcompletiondir="
271 %output "/etc/bash_completion.d/"))
273 (modify-phases %standard-phases
274 (add-after 'unpack 'delete-socket-tests
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)
281 (string-append "// " text)))
284 `(("cppunit" ,cppunit) ; for the tests
285 ("pkg-config" ,pkg-config)))
295 (home-page "https://aria2.github.io/")
296 (synopsis "Utility for parallel downloading files")
298 "Aria2 is a lightweight, multi-protocol & multi-source command-line
299 download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
300 Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
309 (uri (string-append "mirror://sourceforge/urlget/"
310 "uget%20%28stable%29/" version "/uget-"
314 "0919cf7lfk1djdl003cahqjvafdliv7v2l8r5wg95n4isqggdk75"))))
315 (build-system gnu-build-system)
317 `(("intltool" ,intltool)))
323 ("gstreamer" ,gstreamer)
324 ("libgcrypt" ,libgcrypt)
325 ("libnotify" ,libnotify)
326 ("openssl" ,openssl)))
328 `(("intltool" ,intltool)
329 ("pkg-config" ,pkg-config)))
330 (home-page "http://ugetdm.com/")
331 (synopsis "Universal download manager with GTK+ interface")
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+)))
338 (define-public mktorrent
344 (file-name (string-append name "-" version ".tar.gz"))
345 (uri (string-append "https://github.com/Rudde/mktorrent/archive/v"
349 "1j9qc4fxa9isnaygqk6jazsiklqywl2wcs95b8dx01963407bx6h"))))
350 (build-system gnu-build-system)
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"))
360 #:tests? #f)) ; no tests
361 (home-page "https://github.com/Rudde/mktorrent")
362 (synopsis "Utility to create BitTorrent metainfo files")
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
373 (define-public libtorrent-rasterbar
375 (name "libtorrent-rasterbar")
381 "https://github.com/arvidn/libtorrent/releases/download/libtorrent-"
382 (string-join (string-split version #\.) "_")
383 "/libtorrent-rasterbar-" version ".tar.gz"))
386 "1vr1a7smkwh7dc7jb9n68i0cg59wxhgywxc9kxpbs8fi9c04vixp"))))
387 (build-system gnu-build-system)
390 (list (string-append "--with-boost-libdir="
391 (assoc-ref %build-inputs "boost")
393 "--enable-python-binding"
396 (string-append "LDFLAGS=-Wl,-rpath="
397 (assoc-ref %outputs "out") "/lib"))))
398 (inputs `(("boost" ,boost)
399 ("openssl" ,openssl)))
400 (native-inputs `(("python" ,python-2)
401 ("pkg-config" ,pkg-config)))
402 (home-page "https://www.libtorrent.org/")
403 (synopsis "Feature complete BitTorrent implementation")
405 "libtorrent-rasterbar is a feature complete C++ BitTorrent implementation
406 focusing on efficiency and scalability. It runs on embedded devices as well as