bittorrent.scm 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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, 2017, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
  5. ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2016 Tomáš Čech <sleep_walker@gnu.org>
  7. ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  8. ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
  9. ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
  10. ;;; Copyright © 2018 Nam Nguyen <namn@berkeley.edu>
  11. ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
  12. ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
  13. ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
  14. ;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
  15. ;;;
  16. ;;; This file is part of GNU Guix.
  17. ;;;
  18. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  19. ;;; under the terms of the GNU General Public License as published by
  20. ;;; the Free Software Foundation; either version 3 of the License, or (at
  21. ;;; your option) any later version.
  22. ;;;
  23. ;;; GNU Guix is distributed in the hope that it will be useful, but
  24. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  25. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. ;;; GNU General Public License for more details.
  27. ;;;
  28. ;;; You should have received a copy of the GNU General Public License
  29. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  30. (define-module (gnu packages bittorrent)
  31. #:use-module (guix packages)
  32. #:use-module (guix download)
  33. #:use-module (guix git-download)
  34. #:use-module (guix build-system gnu)
  35. #:use-module (guix build-system python)
  36. #:use-module (guix build-system glib-or-gtk)
  37. #:use-module ((guix licenses) #:prefix l:)
  38. #:use-module (guix utils)
  39. #:use-module (gnu packages)
  40. #:use-module (gnu packages adns)
  41. #:use-module (gnu packages autotools)
  42. #:use-module (gnu packages boost)
  43. #:use-module (gnu packages check)
  44. #:use-module (gnu packages compression)
  45. #:use-module (gnu packages crypto)
  46. #:use-module (gnu packages curl)
  47. #:use-module (gnu packages cyrus-sasl)
  48. #:use-module (gnu packages freedesktop)
  49. #:use-module (gnu packages gettext)
  50. #:use-module (gnu packages glib)
  51. #:use-module (gnu packages gnome)
  52. #:use-module (gnu packages gnupg)
  53. #:use-module (gnu packages gstreamer)
  54. #:use-module (gnu packages gtk)
  55. #:use-module (gnu packages libevent)
  56. #:use-module (gnu packages multiprecision)
  57. #:use-module (gnu packages nettle)
  58. #:use-module (gnu packages ncurses)
  59. #:use-module (gnu packages pkg-config)
  60. #:use-module (gnu packages python)
  61. #:use-module (gnu packages python-build)
  62. #:use-module (gnu packages python-crypto)
  63. #:use-module (gnu packages python-web)
  64. #:use-module (gnu packages python-xyz)
  65. #:use-module (gnu packages qt)
  66. #:use-module (gnu packages sqlite)
  67. #:use-module (gnu packages ssh)
  68. #:use-module (gnu packages tls)
  69. #:use-module (gnu packages xml))
  70. (define-public transmission
  71. (package
  72. (name "transmission")
  73. (version "3.00")
  74. (source (origin
  75. (method url-fetch)
  76. (uri (string-append "https://github.com/transmission/transmission"
  77. "/releases/download/" version "/transmission-"
  78. version ".tar.xz"))
  79. (sha256
  80. (base32
  81. "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i"))
  82. (patches (search-patches "transmission-honor-localedir.patch"))))
  83. (build-system glib-or-gtk-build-system)
  84. (outputs '("out" ; library and command-line interface
  85. "gui")) ; graphical user interface
  86. (arguments
  87. '(#:configure-flags
  88. (list (string-append "--localedir="
  89. (assoc-ref %outputs "gui")
  90. "/share/locale"))
  91. ;; Some tests segfault when using libevent 2.12 without internet
  92. ;; connection. This has been reported mainstream but not fixed yet:
  93. ;; https://github.com/transmission/transmission/issues/1437.
  94. #:tests? #f
  95. #:glib-or-gtk-wrap-excluded-outputs '("out")
  96. #:phases
  97. (modify-phases %standard-phases
  98. (add-after 'install 'move-gui
  99. (lambda* (#:key outputs #:allow-other-keys)
  100. ;; Move the GUI to its own output, so that "out" doesn't
  101. ;; depend on GTK+.
  102. (let ((out (assoc-ref outputs "out"))
  103. (gui (assoc-ref outputs "gui")))
  104. (mkdir-p (string-append gui "/bin"))
  105. (rename-file (string-append out "/bin/transmission-gtk")
  106. (string-append gui "/bin/transmission-gtk"))
  107. (for-each
  108. (lambda (dir)
  109. (rename-file (string-append out "/share/" dir)
  110. (string-append gui "/share/" dir)))
  111. '("appdata" "applications" "icons" "pixmaps"))
  112. (mkdir-p (string-append gui "/share/man/man1"))
  113. (rename-file
  114. (string-append out "/share/man/man1/transmission-gtk.1")
  115. (string-append gui "/share/man/man1/transmission-gtk.1"))
  116. #t))))))
  117. (inputs
  118. `(("libevent" ,libevent)
  119. ("curl" ,curl)
  120. ("openssl" ,openssl)
  121. ("zlib" ,zlib)
  122. ("gtk+" ,gtk+)))
  123. (native-inputs
  124. `(("intltool" ,intltool)
  125. ("pkg-config" ,pkg-config)))
  126. (home-page "https://transmissionbt.com/")
  127. (synopsis "Fast and easy BitTorrent client")
  128. (description
  129. "Transmission is a BitTorrent client that comes with graphical,
  130. textual, and Web user interfaces. Transmission also has a daemon for
  131. unattended operations. It supports local peer discovery, full encryption,
  132. DHT, µTP, PEX and Magnet Links.")
  133. ;; COPYING reads:
  134. ;;
  135. ;; Transmission can be redistributed and/or modified under the terms of
  136. ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2),
  137. ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3),
  138. ;; or any future license endorsed by Mnemosyne LLC.
  139. ;;
  140. ;; A few files files carry an MIT/X11 license header.
  141. (license (list l:gpl2 l:gpl3))))
  142. (define-public transmission-remote-gtk
  143. (package
  144. (name "transmission-remote-gtk")
  145. (version "1.4.1")
  146. (source
  147. (origin
  148. (method url-fetch)
  149. (uri (string-append "https://github.com/transmission-remote-gtk/"
  150. "transmission-remote-gtk/releases/download/"
  151. version "/transmission-remote-gtk-" version
  152. ".tar.xz"))
  153. (patches (search-patches "transmission-remote-gtk-fix-appstream.patch"))
  154. (sha256
  155. (base32 "1aqjl5rgamgcgqvcldd1gzyfh2xci0m7070924d6vz2qln0q75sr"))))
  156. (build-system gnu-build-system)
  157. (native-inputs
  158. `(("gettext" ,gnu-gettext)
  159. ("pkg-config" ,pkg-config)))
  160. (inputs
  161. `(("appstream-glib" ,appstream-glib)
  162. ("curl" ,curl)
  163. ("gtk+" ,gtk+)
  164. ("json-glib" ,json-glib)))
  165. (synopsis "Gtk frontend to the Transmission daemon")
  166. (description "transmission-remote-gtk is a GTK client for remote management
  167. of the Transmission BitTorrent client, using its HTTP RPC protocol.")
  168. (home-page "https://github.com/transmission-remote-gtk/transmission-remote-gtk")
  169. (license l:gpl2+)))
  170. (define-public libtorrent
  171. (package
  172. (name "libtorrent")
  173. (version "0.13.8")
  174. (source (origin
  175. (method url-fetch)
  176. (uri (string-append
  177. "http://rtorrent.net/downloads/libtorrent-"
  178. version ".tar.gz"))
  179. (sha256
  180. (base32
  181. "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd"))))
  182. (build-system gnu-build-system)
  183. (inputs `(("openssl" ,openssl)
  184. ("zlib" ,zlib)))
  185. (native-inputs `(("pkg-config" ,pkg-config)
  186. ("cppunit" ,cppunit)))
  187. (synopsis "BitTorrent library of rtorrent")
  188. (description
  189. "LibTorrent is a BitTorrent library used by and developed in parallel
  190. with the BitTorrent client rtorrent. It is written in C++ with emphasis on
  191. speed and efficiency.")
  192. (home-page "https://github.com/rakshasa/libtorrent")
  193. (license l:gpl2+)))
  194. (define-public rtorrent
  195. (package
  196. (name "rtorrent")
  197. (version "0.9.8")
  198. (source (origin
  199. (method url-fetch)
  200. (uri (string-append
  201. "http://rtorrent.net/downloads/rtorrent-"
  202. version ".tar.gz"))
  203. (sha256
  204. (base32
  205. "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy"))))
  206. (build-system gnu-build-system)
  207. (inputs `(("libtorrent" ,libtorrent)
  208. ("ncurses" ,ncurses)
  209. ("curl" ,curl)
  210. ("cyrus-sasl" ,cyrus-sasl)
  211. ("openssl" ,openssl)
  212. ("zlib" ,zlib)))
  213. (native-inputs `(("pkg-config" ,pkg-config)
  214. ("cppunit" ,cppunit)))
  215. (synopsis "BitTorrent client with ncurses interface")
  216. (description
  217. "rTorrent is a BitTorrent client with an ncurses interface. It supports
  218. full encryption, DHT, PEX, and Magnet Links. It can also be controlled via
  219. XML-RPC over SCGI.")
  220. (home-page "https://github.com/rakshasa/rtorrent")
  221. (license l:gpl2+)))
  222. (define-public tremc
  223. (package
  224. (name "tremc")
  225. (version "0.9.2")
  226. (source
  227. (origin
  228. (method git-fetch)
  229. (uri (git-reference
  230. (url "https://github.com/tremc/tremc")
  231. (commit version)))
  232. (file-name (git-file-name name version))
  233. (sha256
  234. (base32
  235. "1fqspp2ckafplahgba54xmx0sjidx1pdzyjaqjhz0ivh98dkx2n5"))))
  236. (build-system gnu-build-system)
  237. (arguments
  238. `(#:tests? #f ; no test suite
  239. #:make-flags
  240. (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
  241. #:phases
  242. (modify-phases %standard-phases
  243. ;; The software is just a Python script that must be copied into place.
  244. (delete 'configure)
  245. (delete 'build))))
  246. (inputs
  247. `(("python" ,python)))
  248. (synopsis "Console client for the Transmission BitTorrent daemon")
  249. (description "Tremc is a console client, with a curses interface, for the
  250. Transmission BitTorrent daemon.")
  251. (home-page "https://github.com/tremc/tremc")
  252. (license l:gpl3+)))
  253. (define-public transmission-remote-cli
  254. (package
  255. (name "transmission-remote-cli")
  256. (version "1.7.1")
  257. (source (origin
  258. (method git-fetch)
  259. (uri (git-reference
  260. (url "https://github.com/fagga/transmission-remote-cli")
  261. (commit (string-append "v" version))))
  262. (file-name (git-file-name name version))
  263. (sha256
  264. (base32
  265. "09w9f8vrm61lapin8fmq4rgahr95y3c6wss10g0fgd0kl16f895v"))))
  266. (build-system python-build-system)
  267. (arguments
  268. `(#:python ,python-2 ; only supports Python 2
  269. #:tests? #f ; no test suite
  270. #:phases (modify-phases %standard-phases
  271. ;; The software is just a Python script that must be
  272. ;; copied into place.
  273. (delete 'build)
  274. (replace 'install
  275. (lambda* (#:key outputs #:allow-other-keys)
  276. (let* ((out (assoc-ref outputs "out"))
  277. (bin (string-append out "/bin"))
  278. (man (string-append out "/share/man/man1"))
  279. ;; FIXME install zsh completions
  280. (completions (string-append out "/etc/bash_completion.d")))
  281. (install-file "transmission-remote-cli" bin)
  282. (install-file "transmission-remote-cli.1" man)
  283. (install-file
  284. (string-append
  285. "completion/bash/"
  286. "transmission-remote-cli-bash-completion.sh")
  287. completions)))))))
  288. (synopsis "Console client for the Transmission BitTorrent daemon")
  289. (description "Transmission-remote-cli is a console client, with a curses
  290. interface, for the Transmission BitTorrent daemon. This package is no longer
  291. maintained upstream.")
  292. (home-page "https://github.com/fagga/transmission-remote-cli")
  293. (license l:gpl3+)
  294. (properties `((superseded . ,tremc)))))
  295. (define-public aria2
  296. (package
  297. (name "aria2")
  298. (version "1.35.0")
  299. (source (origin
  300. (method url-fetch)
  301. (uri (string-append "https://github.com/aria2/aria2/releases/"
  302. "download/release-" version
  303. "/aria2-" version ".tar.xz"))
  304. (sha256
  305. (base32
  306. "1zbxc517d97lb96f15xcy4l7b66grxrp3h2ids2jiwkaip87yaqy"))))
  307. (build-system gnu-build-system)
  308. (arguments
  309. `(#:configure-flags (list "--enable-libaria2"
  310. (string-append "--with-bashcompletiondir="
  311. %output "/etc/bash_completion.d/"))
  312. #:phases
  313. (modify-phases %standard-phases
  314. (add-after 'unpack 'delete-socket-tests
  315. (lambda _
  316. (substitute* "test/LpdMessageDispatcherTest.cc"
  317. (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text)
  318. (string-append "// " text)))
  319. (substitute* "test/LpdMessageReceiverTest.cc"
  320. (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text)
  321. (string-append "// " text)))
  322. #t)))))
  323. (native-inputs
  324. `(("cppunit" ,cppunit) ; for the tests
  325. ("pkg-config" ,pkg-config)))
  326. (inputs
  327. `(("c-ares" ,c-ares)
  328. ("gnutls" ,gnutls)
  329. ("gmp" ,gmp)
  330. ("libssh2" ,libssh2)
  331. ("libxml2" ,libxml2)
  332. ("nettle" ,nettle)
  333. ("sqlite" ,sqlite)
  334. ("zlib" ,zlib)))
  335. (home-page "https://aria2.github.io/")
  336. (synopsis "Utility for parallel downloading files")
  337. (description
  338. "Aria2 is a lightweight, multi-protocol & multi-source command-line
  339. download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
  340. Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.")
  341. (license l:gpl2+)))
  342. (define-public uget
  343. (package
  344. (name "uget")
  345. (version "2.2.1")
  346. (source
  347. (origin
  348. (method url-fetch)
  349. (uri (string-append "mirror://sourceforge/urlget/"
  350. "uget%20%28stable%29/" version "/uget-"
  351. version ".tar.gz"))
  352. (sha256
  353. (base32 "0dlrjhnm1pg2vwmp7nl2xv1aia5hyirb3021rl46x859k63zap24"))))
  354. (build-system gnu-build-system)
  355. (inputs
  356. `(("curl" ,curl)
  357. ("gtk+" ,gtk+)
  358. ("glib" ,glib)
  359. ("gnutls" ,gnutls)
  360. ("gstreamer" ,gstreamer)
  361. ("libgcrypt" ,libgcrypt)
  362. ("libnotify" ,libnotify)
  363. ("openssl" ,openssl)))
  364. (native-inputs
  365. `(("intltool" ,intltool)
  366. ("pkg-config" ,pkg-config)))
  367. (home-page "https://ugetdm.com/")
  368. (synopsis "Universal download manager with GTK+ interface")
  369. (description
  370. "uGet is portable download manager with GTK+ interface supporting
  371. HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection
  372. downloads, download scheduling, download rate limiting.")
  373. (license l:lgpl2.1+)))
  374. (define-public mktorrent
  375. (package
  376. (name "mktorrent")
  377. (version "1.1")
  378. (source (origin
  379. (method git-fetch)
  380. (uri (git-reference
  381. (url "https://github.com/Rudde/mktorrent")
  382. (commit (string-append "v" version))))
  383. (file-name (git-file-name name version))
  384. (sha256
  385. (base32
  386. "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr"))))
  387. (build-system gnu-build-system)
  388. (arguments
  389. `(#:phases (modify-phases %standard-phases
  390. (delete 'configure)) ; no configure script
  391. #:make-flags (list (string-append "CC=" ,(cc-for-target))
  392. (string-append "PREFIX=" (assoc-ref %outputs "out"))
  393. "NO_HASH_CHECK=1"
  394. "USE_LARGE_FILES=1"
  395. "USE_LONG_OPTIONS=1"
  396. "USE_PTHREADS=1")
  397. #:tests? #f)) ; no tests
  398. (home-page "https://github.com/Rudde/mktorrent")
  399. (synopsis "Utility to create BitTorrent metainfo files")
  400. (description
  401. "mktorrent is a simple command-line utility to create BitTorrent
  402. @dfn{metainfo} files, often known simply as @dfn{torrents}, from both single
  403. files and whole directories. It can add multiple trackers and web seed URLs,
  404. and set the @code{private} flag to disallow advertisement through the
  405. distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded
  406. and will take advantage of multiple processor cores where possible.")
  407. (license (list l:public-domain ; sha1.*, used to build without OpenSSL
  408. l:gpl2+)))) ; with permission to link with OpenSSL
  409. (define-public libtorrent-rasterbar
  410. (package
  411. (name "libtorrent-rasterbar")
  412. (version "1.2.8")
  413. (source
  414. (origin
  415. (method url-fetch)
  416. (uri
  417. (string-append "https://github.com/arvidn/libtorrent/"
  418. "releases/download/libtorrent-" version "/"
  419. "libtorrent-rasterbar-" version ".tar.gz"))
  420. (sha256
  421. (base32 "1phn4klzvfzvidv5g566pnrrxj8l0givpy6s4r17d45wznqxc006"))))
  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-python-binding"
  429. "--enable-tests")
  430. #:make-flags (list
  431. (string-append "LDFLAGS=-Wl,-rpath="
  432. (assoc-ref %outputs "out") "/lib"))))
  433. (inputs `(("boost" ,boost)
  434. ("openssl" ,openssl)))
  435. (native-inputs `(("python" ,python-wrapper)
  436. ("pkg-config" ,pkg-config)))
  437. (home-page "https://www.libtorrent.org/")
  438. (synopsis "Feature-complete BitTorrent implementation")
  439. (description
  440. "libtorrent-rasterbar is a feature-complete C++ BitTorrent implementation
  441. focusing on efficiency and scalability. It runs on embedded devices as well as
  442. desktops.")
  443. (license l:bsd-2)))
  444. (define-public qbittorrent
  445. (package
  446. (name "qbittorrent")
  447. (version "4.2.5")
  448. (source
  449. (origin
  450. (method git-fetch)
  451. (uri (git-reference
  452. (url "https://github.com/qbittorrent/qBittorrent")
  453. (commit (string-append "release-" version))))
  454. (file-name (git-file-name name version))
  455. (sha256
  456. (base32 "1n613ylg6i9gisgk0dbr2kpfasyizrkdjff1r8smd4vri2qrdksn"))))
  457. (build-system gnu-build-system)
  458. (arguments
  459. `(#:configure-flags
  460. (list (string-append "--with-boost-libdir="
  461. (assoc-ref %build-inputs "boost")
  462. "/lib")
  463. "--enable-debug"
  464. "QMAKE_LRELEASE=lrelease")
  465. #:modules ((guix build gnu-build-system)
  466. (guix build qt-utils)
  467. (guix build utils))
  468. #:imported-modules (,@%gnu-build-system-modules
  469. (guix build qt-utils))
  470. #:phases
  471. (modify-phases %standard-phases
  472. (add-after 'install 'wrap-qt
  473. (lambda* (#:key outputs inputs #:allow-other-keys)
  474. (let ((out (assoc-ref outputs "out")))
  475. (wrap-qt-program "qbittorrent" #:output out #:inputs inputs))
  476. #t)))))
  477. (native-inputs
  478. `(("pkg-config" ,pkg-config)
  479. ("qttools" ,qttools)))
  480. (inputs
  481. `(("boost" ,boost)
  482. ("libtorrent-rasterbar" ,libtorrent-rasterbar)
  483. ("openssl" ,openssl)
  484. ("python" ,python-wrapper)
  485. ("qtbase" ,qtbase-5)
  486. ("qtsvg" ,qtsvg)
  487. ("zlib" ,zlib)))
  488. (home-page "https://www.qbittorrent.org/")
  489. (synopsis "Graphical BitTorrent client")
  490. (description
  491. "qBittorrent is a BitTorrent client programmed in C++/Qt that uses
  492. libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg.
  493. It aims to be a good alternative to all other BitTorrent clients out there.
  494. qBittorrent is fast, stable and provides unicode support as well as many
  495. features.")
  496. (license l:gpl2+)))
  497. (define-public deluge
  498. (package
  499. (name "deluge")
  500. (version "2.0.3")
  501. (source
  502. (origin
  503. (method url-fetch)
  504. (uri (string-append
  505. "https://ftp.osuosl.org/pub/deluge/source/"
  506. (version-major+minor version) "/deluge-" version ".tar.xz"))
  507. (sha256
  508. (base32
  509. "14d8kn2pvr1qv8mwqrxmj85jycr73vwfqz12hzag0ararbkfhyky"))))
  510. (build-system python-build-system)
  511. (propagated-inputs
  512. `(("gtk+" ,gtk+)
  513. ("librsvg" ,librsvg)
  514. ("libtorrent" ,libtorrent-rasterbar)
  515. ("python-pycairo" ,python-pycairo)
  516. ("python-chardet" ,python-chardet)
  517. ("python-dbus" ,python-dbus)
  518. ("python-mako" ,python-mako)
  519. ("python-pygobject" ,python-pygobject)
  520. ("python-pillow" ,python-pillow)
  521. ("python-pyopenssl" ,python-pyopenssl)
  522. ("python-pyxdg" ,python-pyxdg)
  523. ("python-rencode" ,python-rencode)
  524. ("python-service-identity" ,python-service-identity)
  525. ("python-setproctitle" ,python-setproctitle)
  526. ("python-six" ,python-six)
  527. ("python-twisted" ,python-twisted)
  528. ("python-zope-interface" ,python-zope-interface)))
  529. (native-inputs
  530. `(("intltool" ,intltool)
  531. ("python-wheel" ,python-wheel)))
  532. ;; TODO: Enable tests.
  533. ;; After "pytest-twisted" is packaged, HOME is set, and an X server is
  534. ;; started, some of the tests still fail. There are likely some tests
  535. ;; that require a network connection.
  536. (arguments
  537. `(#:tests? #f
  538. #:phases
  539. (modify-phases %standard-phases
  540. ;; Remove this phase when upgrading to version 2.0.4 or beyond, as
  541. ;; the issue is fixed upstream.
  542. (add-after 'unpack 'fix-gettext-warning
  543. (lambda _
  544. (substitute* "deluge/i18n/util.py"
  545. (("names='ngettext'") "names=['ngettext']"))
  546. #t))
  547. (add-after 'install 'wrap
  548. (lambda* (#:key outputs #:allow-other-keys)
  549. (let ((out (assoc-ref outputs "out"))
  550. (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  551. (for-each
  552. (lambda (program)
  553. (wrap-program program
  554. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
  555. (map (lambda (name)
  556. (string-append out "/bin/" name))
  557. '("deluge" "deluge-gtk"))))
  558. #t)))))
  559. (home-page "https://www.deluge-torrent.org/")
  560. (synopsis "Fully-featured cross-platform ​BitTorrent client")
  561. (description
  562. "Deluge contains the common features to BitTorrent clients such as
  563. Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange
  564. (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent
  565. speed limits. Deluge heavily utilises the ​libtorrent library. It is
  566. designed to run as both a normal standalone desktop application and as a
  567. ​client-server.")
  568. (license l:gpl3+)))