aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-pki)
  #:use-module (guix pki)
  #:use-module (gcrypt pk-crypto)
  #:use-module (gcrypt hash)
  #:use-module (rnrs io ports)
  #:use-module (srfi srfi-64))

;; Test the (guix pki) module.

(define %public-key
  (call-with-input-file %public-key-file
    (compose string->canonical-sexp get-string-all)))

(define %secret-key
  (call-with-input-file %private-key-file
    (compose string->canonical-sexp get-string-all)))

(define %alternate-secret-key
  (string->canonical-sexp
   "
  (key-data
   (public-key
    (rsa
     (n #00FDBF170366AC43B7D95CF9085565C566FB1F21B17C0A36E68F35ABB500E7851E00B40D7B04C8CD25903371F38E4C298FACEFFC4C97E913B536A0672BAF99D04515AE98A1A56627CD7EB02502FCFBEEA21AF13CC1A853192AD6409B9EFBD9F549BDE32BD890AE01F9A221E81FEE1C407090550647790E0D60775B855E181C2FB5#)
     (e #010001#)))
   (private-key
    (rsa
     (n #00FDBF170366AC43B7D95CF9085565C566FB1F21B17C0A36E68F35ABB500E7851E00B40D7B04C8CD25903371F38E4C298FACEFFC4C97E913B536A0672BAF99D04515AE98A1A56627CD7EB02502FCFBEEA21AF13CC1A853192AD6409B9EFBD9F549BDE32BD890AE01F9A221E81FEE1C407090550647790E0D60775B855E181C2FB5#)
     (e #010001#)
     (d #2790250C2E74C2FD361A99288BBA19B878048F5A0F333F829CC71B3DD64582DB9DF3F4DB1EB0994DD7493225EDA4A1E1492F44D903617FA5643E47BFC7BA157EF48B492AB51229916B02DDBDA0E7DBC7B35A6B8332AB463DC61951CA694551A9760F5A836A375D39E3EA8F2C502A3B5D89CB8777A809B75D603BE7511CEB74E9#)
     (p #00FE15B1751E1C31125B724FF37462F9476239A2AFF4192FAB1550F76928C8D02407F4F5EFC83F7A0AF51BD93399DDC06A4B54DFA60A7079F160A9F618C0148AD9#)
     (q #00FFA8BE7005AAB7401B0926CD9D6AC30BC9BE7D12C8737C9438498A999F56BE9F5EA98B4D7F5364BEB6D550A5AEDDE34C1EC152C9DAF61A97FDE71740C73BAA3D#)
     (u #00FD4050EF4F31B41EC81C28E18D205DFFB3C188F15D8BBA300E30AD8B5C4D3E392EFE10269FC115A538B19F4025973AB09B6650A7FF97DA833FB726F3D8819319#))))"))

(test-begin "pki")

(test-assert "current-acl"
  (not (not (member (canonical-sexp->sexp %public-key)
                    (map canonical-sexp->sexp
                         (acl->public-keys (current-acl)))))))

(test-assert "authorized-key? public-key current-acl"
  (authorized-key? %public-key))

(test-assert "authorized-key? public-key empty-acl"
  (not (authorized-key? %public-key (public-keys->acl '()))))

(test-assert "authorized-key? public-key singleton"
  (authorized-key? %public-key (public-keys->acl (list %public-key))))

(test-equal "public-keys->acl deduplication"
  (public-keys->acl (list %public-key))
  (public-keys->acl (make-list 10 %public-key)))

(test-assert "signature-case valid-signature"
  (let* ((hash (sha256 #vu8(1 2 3)))
         (data (bytevector->hash-data hash #:key-type (key-type %public-key)))
         (sig  (signature-sexp data %secret-key %public-key)))
   (signature-case (sig hash (public-keys->acl (list %public-key)))
     (valid-signature #t)
     (else #f))))

(test-eq "signature-case invalid-signature" 'i
  (let* ((hash (sha256 #vu8(1 2 3)))
         (data (bytevector->hash-data hash #:key-type (key-type %public-key)))
         (sig  (signature-sexp data %alternate-secret-key %public-key)))
    (signature-case (sig hash (public-keys->acl (list %public-key)))
      (valid-signature 'v)
      (invalid-signature 'i)
      (hash-mismatch 'm)
      (unauthorized-key 'u)
      (corrupt-signature 'c))))

(test-eq "signature-case hash-mismatch" 'm
  (let* ((hash (sha256 #vu8(1 2 3)))
         (data (bytevector->hash-data hash #:key-type (key-type %public-key)))
         (sig  (signature-sexp data %secret-key %public-key)))
    (signature-case (sig (sha256 #vu8())
                         (public-keys->acl (list %public-key)))
      (valid-signature 'v)
      (invalid-signature 'i)
      (hash-mismatch 'm)
      (unauthorized-key 'u)
      (corrupt-signature 'c))))

(test-eq "signature-case unauthorized-key" 'u
  (let* ((hash (sha256 #vu8(1 2 3)))
         (data (bytevector->hash-data hash #:key-type (key-type %public-key)))
         (sig  (signature-sexp data %secret-key %public-key)))
    (signature-case (sig hash (public-keys->acl '()))
      (valid-signature 'v)
      (invalid-signature 'i)
      (hash-mismatch 'm)
      (unauthorized-key 'u)
      (corrupt-signature 'c))))

(test-eq "signature-case corrupt-signature" 'c
  (let* ((hash (sha256 #vu8(1 2 3)))
         (sig  (string->canonical-sexp "(w tf)")))
    (signature-case (sig hash (public-keys->acl (list %public-key)))
      (valid-signature 'v)
      (invalid-signature 'i)
      (hash-mismatch 'm)
      (unauthorized-key 'u)
      (corrupt-signature 'c))))

(test-end)
(format #t "test suite not run~%")))) (add-after 'install 'move-gui (lambda* (#:key outputs #:allow-other-keys) (mkdir-p (string-append #$output:gui "/bin")) (mkdir-p (string-append #$output:gui "/share/man/man1")) (rename-file (string-append #$output "/bin/transmission-gtk") (string-append #$output:gui "/bin/transmission-gtk")) (for-each (lambda (dir) (rename-file (string-append #$output "/share/" dir) (string-append #$output:gui "/share/" dir))) '("applications" "icons" "metainfo")) (rename-file (string-append #$output "/share/man/man1/transmission-gtk.1") (string-append #$output:gui "/share/man/man1/transmission-gtk.1")))) (add-after 'move-gui 'glib-or-gtk-wrap (lambda* (#:key outputs #:allow-other-keys #:rest args) (apply (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap) #:glib-or-gtk-wrap-excluded-outputs (list "out") args))) (add-after 'glib-or-gtk-wrap 'wrap-program (lambda* (#:key outputs #:allow-other-keys) (wrap-program (string-append #$output:gui "/bin/transmission-gtk") ;; Wrapping GDK_PIXBUF_MODULE_FILE allows Transmission to load ;; its own icons in pure environments. `("GDK_PIXBUF_MODULE_FILE" = (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))) (inputs (list bash-minimal curl (list glib "bin") gtkmm libappindicator libevent openssl python zlib)) (native-inputs (list intltool pkg-config)) (home-page "https://transmissionbt.com/") (synopsis "BitTorrent client") (description "Transmission is a BitTorrent client that comes with graphical, textual, and Web user interfaces. Transmission also has a daemon for unattended operations. It supports local peer discovery, full encryption, DHT, µTP, PEX and Magnet Links.") ;; COPYING reads: ;; ;; Transmission can be redistributed and/or modified under the terms of ;; the GNU GPLv2 (http://www.gnu.org/licenses/license-list.html#GPLv2), ;; the GNU GPLv3 (http://www.gnu.org/licenses/license-list.html#GNUGPLv3), ;; or any future license endorsed by Mnemosyne LLC. ;; ;; A few files files carry an MIT/X11 license header. (license (list l:gpl2 l:gpl3)))) (define-public transmission-remote-gtk (package (name "transmission-remote-gtk") (version "1.4.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/transmission-remote-gtk/" "transmission-remote-gtk/releases/download/" version "/transmission-remote-gtk-" version ".tar.gz")) (sha256 (base32 "0qz9wi70qc6vgnaymivc3xz6y86c9hglk6wjv3snnqxpxmp9saay")))) (build-system gnu-build-system) (native-inputs (list gnu-gettext pkg-config)) (inputs (list appstream-glib curl gtk+ json-glib)) (synopsis "Gtk frontend to the Transmission daemon") (description "transmission-remote-gtk is a GTK client for remote management of the Transmission BitTorrent client, using its HTTP RPC protocol.") (home-page "https://github.com/transmission-remote-gtk/transmission-remote-gtk") (license l:gpl2+))) (define-public libtorrent (package (name "libtorrent") (version "0.13.8") (source (origin (method url-fetch) (uri (string-append "http://rtorrent.net/downloads/libtorrent-" version ".tar.gz")) (sha256 (base32 "10z9i1rc41cmmi7nx8k7k1agsx6afv09g9cl7g9zr35fyhl5l4gd")))) (build-system gnu-build-system) (inputs (list openssl zlib)) (native-inputs (list pkg-config cppunit)) (synopsis "BitTorrent library of rtorrent") (description "LibTorrent is a BitTorrent library used by and developed in parallel with the BitTorrent client rtorrent. It is written in C++ with emphasis on speed and efficiency.") (home-page "https://github.com/rakshasa/libtorrent") (license l:gpl2+))) (define-public rtorrent (package (name "rtorrent") (version "0.9.8") (source (origin (method url-fetch) (uri (string-append "http://rtorrent.net/downloads/rtorrent-" version ".tar.gz")) (sha256 (base32 "1bs2fnf4q7mlhkhzp3i1v052v9xn8qa7g845pk9ia8hlpw207pwy")))) (build-system gnu-build-system) (inputs (list libtorrent ncurses curl cyrus-sasl openssl zlib)) (native-inputs (list pkg-config cppunit)) (synopsis "BitTorrent client with ncurses interface") (description "rTorrent is a BitTorrent client with an ncurses interface. It supports full encryption, DHT, PEX, and Magnet Links. It can also be controlled via XML-RPC over SCGI.") (home-page "https://github.com/rakshasa/rtorrent") (license l:gpl2+))) (define-public tremc (let ((commit "d8deaa5ac25bb45a2ca3a930309d6ecc74836a54") (revision "1")) (package (name "tremc") (version (git-version "0.9.3" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/tremc/tremc") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "08kpqmgisja98918f2hlmdrld5662dqlkssp0pqlki38l6fvbj7r")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no test suite #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) #:phases (modify-phases %standard-phases ;; The software is just a Python script that must be copied into place. (delete 'configure) (delete 'build)))) (inputs (list python)) (synopsis "Console client for the Transmission BitTorrent daemon") (description "Tremc is a console client, with a curses interface, for the Transmission BitTorrent daemon.") (home-page "https://github.com/tremc/tremc") (license l:gpl3+)))) (define-public aria2 (package (name "aria2") (version "1.37.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/aria2/aria2/releases/" "download/release-" version "/aria2-" version ".tar.xz")) (sha256 (base32 "0sxng4pynhj2qinranpv6wyzys3d42kz1gg2nrn63sw5f2nj1930")) (patches (search-patches "aria2-unbundle-wslay.patch")) (snippet #~(begin (use-modules (guix build utils)) (delete-file-recursively "deps") (delete-file "configure"))))) (build-system gnu-build-system) (arguments (list #:configure-flags #~(list "--enable-libaria2" (string-append "--with-bashcompletiondir=" #$output "/etc/bash_completion.d/")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'delete-socket-tests (lambda _ (substitute* "test/LpdMessageDispatcherTest.cc" (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageDispatcherTest\\);" text) (string-append "// " text))) (substitute* "test/LpdMessageReceiverTest.cc" (("CPPUNIT_TEST_SUITE_REGISTRATION\\(LpdMessageReceiverTest\\);" text) (string-append "// " text)))))))) (native-inputs (list autoconf ; since we adjusted configure.ac automake gettext-minimal libtool cppunit ; for the tests pkg-config)) (inputs (list c-ares gnutls gmp libssh2 libxml2 nettle sqlite wslay zlib)) (home-page "https://aria2.github.io/") (synopsis "Utility for parallel downloading files") (description "Aria2 is a lightweight, multi-protocol & multi-source command-line download utility. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink. Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.") (properties '((release-monitoring-url . "https://github.com/aria2/aria2/releases"))) (license l:gpl2+))) (define-public uget (package (name "uget") (version "2.2.1") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/urlget/" "uget%20%28stable%29/" version "/uget-" version ".tar.gz")) (sha256 (base32 "0dlrjhnm1pg2vwmp7nl2xv1aia5hyirb3021rl46x859k63zap24")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("CFLAGS=-fcommon"))) (inputs (list curl gtk+ glib gnutls gstreamer libgcrypt libnotify openssl)) (native-inputs (list intltool pkg-config)) (home-page "https://ugetdm.com/") (synopsis "Universal download manager with GTK+ interface") (description "uGet is portable download manager with GTK+ interface supporting HTTP, HTTPS, BitTorrent and Metalink, supporting multi-connection downloads, download scheduling, download rate limiting.") (license l:lgpl2.1+))) (define-public mktorrent (package (name "mktorrent") (version "1.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Rudde/mktorrent") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "17pdc5mandl739f8q26n5is8ga56s83aqcrwhlnnplbxwx2inidr")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases (delete 'configure)) ; no configure script #:make-flags (list (string-append "CC=" ,(cc-for-target)) (string-append "PREFIX=" (assoc-ref %outputs "out")) "NO_HASH_CHECK=1" "USE_LARGE_FILES=1" "USE_LONG_OPTIONS=1" "USE_PTHREADS=1") #:tests? #f)) ; no tests (home-page "https://github.com/Rudde/mktorrent") (synopsis "Utility to create BitTorrent metainfo files") (description "mktorrent is a simple command-line utility to create BitTorrent @dfn{metainfo} files, often known simply as @dfn{torrents}, from both single files and whole directories. It can add multiple trackers and web seed URLs, and set the @code{private} flag to disallow advertisement through the distributed hash table (@dfn{DHT}) and Peer Exchange. Hashing is multi-threaded and will take advantage of multiple processor cores where possible.") (license (list l:public-domain ; sha1.*, used to build without OpenSSL l:gpl2+)))) ; with permission to link with OpenSSL (define %v2_empty_file.torrent (origin (method url-fetch) (uri "https://github.com/arvidn/libtorrent/raw/v2.0.9/test/test_torrents/v2_empty_file.torrent") (sha256 (base32 "1hydgf0m9193hy9010wl0wrbz4k4cgrqg70jakx68pgi79jcqnrn")))) (define-public libtorrent-rasterbar (package (name "libtorrent-rasterbar") (version "2.0.9") (source (origin (method url-fetch) (uri (string-append "https://github.com/arvidn/libtorrent/" "releases/download/v" version "/" "libtorrent-rasterbar-" version ".tar.gz")) (sha256 (base32 "13kry578ifzz4m2f291bbd7v5v9zsi8y3mf38146cnqw0sv95kch")) ;; https://github.com/arvidn/libtorrent/issues/7566 ;; Remove when resolved. I would hope this to be fixed in 2.0.10. (modules '((guix build utils))) (snippet #~(substitute* "test/test_copy_file.cpp" (("EXT4_SUPER_MAGIC, EXT3_SUPER_MAGIC, XFS_SUPER_MAGIC" all) (string-append all ", TMPFS_MAGIC\n")))))) (build-system cmake-build-system) (arguments `(#:configure-flags '("-Dpython-bindings=ON" "-Dbuild_tests=ON") ;; Tests do not reliably work when executed in parallel. #:parallel-tests? #f #:phases (modify-phases %standard-phases ;; https://github.com/arvidn/libtorrent/issues/7567 ;; Remove when resolved. I would hope this to be fixed in 2.0.10. ;; Do not forget to remove the %v2_empty_file.torrent variable. (add-before 'configure 'copy-v2_empty_file.torrent (lambda* (#:key native-inputs inputs #:allow-other-keys) (copy-file (assoc-ref (or native-inputs inputs) "%v2_empty_file.torrent") "test/test_torrents/v2_empty_file.torrent"))) (replace 'check (lambda* (#:key tests? parallel-tests? #:allow-other-keys) (let* ((disabled-tests '( ;; Requires a non-localhost IPv4 interface. "test_upnp" ;; test_ssl needs to be run separately. "test_ssl")) (exclude-regex (string-append "^(" (string-join disabled-tests "|") ")$")) (timeout "600") (jobs (if parallel-tests? (number->string (parallel-job-count)) "1"))) (when tests? (invoke "ctest" "-E" exclude-regex "-j" jobs "--timeout" timeout "--output-on-failure") ;; test_ssl relies on bundled TLS certificates with a fixed ;; expiry date. To ensure succesful builds in the future, ;; fake the time to be roughly that of the release. ;; ;; At the same time, faketime happens to cause ;; test_fast_extension, test_privacy and test_resolve_links ;; to hang, even with FAKETIME_ONLY_CMDS. Not sure why. So ;; execute only test_ssl under faketime. ;; ;; Note: The test_ssl test times out in the ci. ;; Temporarily disable it until that is resolved. ;; (invoke "faketime" "2022-10-24" ;; "ctest" ;; "-R" "^test_ssl$" ;; "-j" jobs ;; "--timeout" timeout ;; "--output-on-failure") ))))))) (inputs (list boost openssl)) (native-inputs `(("libfaketime" ,libfaketime) ("python-wrapper" ,python-wrapper) ("pkg-config" ,pkg-config) ("%v2_empty_file.torrent" ,%v2_empty_file.torrent))) (home-page "https://www.libtorrent.org/") (synopsis "Feature-complete BitTorrent implementation") (description "libtorrent-rasterbar is a feature-complete C++ BitTorrent implementation focusing on efficiency and scalability. It runs on embedded devices as well as desktops.") (license l:bsd-2))) (define-public libtorrent-rasterbar-1.2 (package (inherit libtorrent-rasterbar) (version "1.2.19") (source (origin (method url-fetch) (uri (string-append "https://github.com/arvidn/libtorrent/" "releases/download/v" version "/" "libtorrent-rasterbar-" version ".tar.gz")) (sha256 (base32 "03p4nvsll568zlyqifid0cn135sg5whbk7g48gkbapnw92ayks7f")))))) (define-public qbittorrent (package (name "qbittorrent") (version "4.6.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/qbittorrent/qBittorrent") (commit (string-append "release-" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0fxjsad9d35pdy0cqjlip46kwgxfim10fy70x6wymn9pagwq9j7p")))) (build-system qt-build-system) (arguments (list #:configure-flags #~(list "-DTESTING=ON") #:test-target "check")) (native-inputs (list qttools-5)) (inputs (list boost libtorrent-rasterbar openssl python-wrapper qtsvg-5 zlib)) (home-page "https://www.qbittorrent.org/") (synopsis "Graphical BitTorrent client") (description "qBittorrent is a BitTorrent client programmed in C++/Qt that uses libtorrent (sometimes called libtorrent-rasterbar) by Arvid Norberg. It aims to be a good alternative to all other BitTorrent clients out there. qBittorrent is fast, stable and provides unicode support as well as many features.") (license l:gpl2+))) (define-public qbittorrent-no-x (let ((base qbittorrent)) (package (inherit base) (name "qbittorrent-no-x") (arguments (substitute-keyword-arguments (package-arguments base) ((#:configure-flags configure-flags) #~(cons "-DGUI=OFF" #$configure-flags)))) (inputs (modify-inputs (package-inputs base) (delete "qtsvg")))))) (define-public qbittorrent-nox (deprecated-package "qbittorrent-nox" qbittorrent-no-x)) (define-public qbittorrent-enhanced (package (inherit qbittorrent) (name "qbittorrent-enhanced") (version "4.6.4.10") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/c0re100/qBittorrent-Enhanced-Edition") (commit (string-append "release-" version)))) (file-name (git-file-name name version)) (sha256 (base32 "02g7677ck5r7yrh8vv3gwg6pfvychbykgzdaxa1xxdzqa7birff2")))) (home-page "https://github.com/c0re100/qBittorrent-Enhanced-Edition") (description "qBittorrent Enhanced is a bittorrent client based on qBittorrent with the following features: @itemize @item Auto Ban Xunlei, QQ, Baidu, Xfplay, DLBT and Offline downloader @item Auto Ban Unknown Peer from China Option (Default: OFF) @item Auto Update Public Trackers List (Default: OFF) @item Auto Ban BitTorrent Media Player Peer Option (Default: OFF) @item Peer whitelist/blacklist @end itemize"))) (define-public qbittorrent-enhanced-no-x (package (inherit qbittorrent-enhanced) (name "qbittorrent-enhanced-no-x") (arguments (package-arguments qbittorrent-no-x)) (inputs (package-inputs qbittorrent-no-x)))) (define-public qbittorrent-enhanced-nox (deprecated-package "qbittorrent-enhanced-nox" qbittorrent-enhanced-no-x)) (define-public deluge (package (name "deluge") (version "2.1.1") (source (origin (method url-fetch) (uri (string-append "https://ftp.osuosl.org/pub/deluge/source/" (version-major+minor version) "/deluge-" version ".tar.xz")) (sha256 (base32 "1xyz8bscwqmd7d8b43svxl42w54pnisvwkkrndx46hifh0cx73bn")))) (build-system python-build-system) (inputs (list bash-minimal)) (propagated-inputs (list gtk+ libtorrent-rasterbar nss-certs python-pycairo python-chardet python-dbus python-mako python-pygobject python-pillow python-pyopenssl python-pyxdg python-rencode python-service-identity python-setproctitle python-six python-twisted python-zope-interface)) (native-inputs (list intltool python-wheel (librsvg-for-system))) (native-search-paths (list $SSL_CERT_DIR $SSL_CERT_FILE)) ;; TODO: Enable tests. ;; After "pytest-twisted" is packaged, HOME is set, and an X server is ;; started, some of the tests still fail. There are likely some tests ;; that require a network connection. (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (add-after 'install 'wrap (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) ;; "librsvg" input is only needed at build time and it ;; conflit with the "librsvg" propageted by "gtk+", so we ;; make sure there is no reference to it in the wrapper. (gi-typelib-path (string-join (filter (lambda (x) (not (string-prefix? (assoc-ref (or native-inputs inputs) "librsvg") x))) (string-split (getenv "GI_TYPELIB_PATH") #\:)) ":"))) (for-each (lambda (program) (wrap-program program `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) (map (lambda (name) (string-append out "/bin/" name)) '("deluge" "deluge-gtk")))) #t))))) (home-page "https://www.deluge-torrent.org/") (synopsis "Fully-featured cross-platform ​BitTorrent client") (description "Deluge contains the common features to BitTorrent clients such as Protocol Encryption, DHT, Local Peer Discovery (LSD), Peer Exchange (PEX), UPnP, NAT-PMP, Proxy support, Web seeds, global and per-torrent speed limits. Deluge heavily utilises the ​libtorrent library. It is designed to run as both a normal standalone desktop application and as a ​client-server.") (license l:gpl3+)))