diff options
Diffstat (limited to 'gnu/packages/networking.scm')
-rw-r--r-- | gnu/packages/networking.scm | 130 |
1 files changed, 67 insertions, 63 deletions
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 004c97cd20..26f4be421a 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2018, 2020, 2021 Marius Bakke <marius@gnu.org> ;;; Copyright © 2018, 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> -;;; Copyright © 2019, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2019, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2019 Vasile Dumitrascu <va511e@yahoo.com> ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2019 Timotej Lazar <timotej.lazar@araneo.si> @@ -67,6 +67,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system glib-or-gtk) @@ -2824,14 +2825,14 @@ can be whipped up with little effort.") (define-public mtr (package (name "mtr") - (version "0.94") + (version "0.95") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.bitwizard.nl/mtr/" "mtr-" version ".tar.gz")) (sha256 - (base32 "1glxvlqskcmjkxlqk9i12hcfaxb389cx2n8ji7776gmix3aq4z1z")))) + (base32 "0haanralbvd12pvkyihgkmx9ld74dnzm1s7mzparfandl416ibff")))) (build-system gnu-build-system) (inputs (list libcap ncurses)) @@ -3357,11 +3358,14 @@ and targeted primarily for asynchronous processing of HTTP-requests.") (license license:bsd-3))) (define-public opendht - (let ((commit "6c58d4f2e9b7f1de15db8d3a736c8cf1ea5f2886") - (revision "1")) + ;; The version/commit is kept in sync with what Jami uses in its daemon + ;; contrib build system (see: + ;; https://review.jami.net/plugins/gitiles/jami-daemon/+/refs/heads/master/contrib/src/opendht/rules.mak). + (let ((commit "dbbfdaab0f4119abf79646313e0dbc52881dcd56") + (revision "0")) (package (name "opendht") - (version (git-version "2.3.0" revision commit)) + (version (git-version "2.3.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference @@ -3370,21 +3374,65 @@ and targeted primarily for asynchronous processing of HTTP-requests.") (file-name (git-file-name name version)) (sha256 (base32 - "06l0z1dmxyjh8gdrmxyq4vnfnv3x400bhx0lxm7l90f8zc5r2bim")))) - ;; Since 2.0, the gnu-build-system does not seem to work anymore, upstream bug? + "07x8vw999qpfl6qwj5k5l2mcjy1vp32sd567f6imbsnh9vlx2bdv")))) (outputs '("out" "tools" "debug")) - (build-system cmake-build-system) - (inputs - (list argon2 - nettle - readline - jsoncpp - openssl ;required for the DHT proxy - fmt)) + (build-system gnu-build-system) + (arguments + (list + #:imported-modules `((guix build python-build-system) ;for site-packages + ,@%gnu-build-system-modules) + #:modules '(((guix build python-build-system) #:prefix python:) + (guix build gnu-build-system) + (guix build utils)) + #:tests? #f ;tests require networking + #:configure-flags + #~(list "--enable-tests" + "--enable-proxy-server" + "--enable-push-notifications" + "--enable-proxy-server-identity" + "--enable-proxy-client") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-python-installation-prefix + ;; Specify the installation prefix for the compiled Python module + ;; that would otherwise attempt to installs itself to Python's own + ;; site-packages directory. + (lambda _ + (substitute* "python/Makefile.am" + (("--root=\\$\\(DESTDIR)/") + (string-append "--root=/ --single-version-externally-managed " + "--prefix=" #$output))))) + (add-after 'unpack 'specify-runpath-for-python-module + (lambda _ + (substitute* "python/setup.py.in" + (("extra_link_args=\\[(.*)\\]" _ args) + (string-append "extra_link_args=[" args + ", '-Wl,-rpath=" #$output "/lib']"))))) + (add-after 'install 'move-and-wrap-tools + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((tools (assoc-ref outputs "tools")) + (dhtcluster (string-append tools "/bin/dhtcluster")) + (site-packages (python:site-packages inputs outputs))) + (mkdir tools) + (rename-file (string-append #$output "/bin") + (string-append tools "/bin")) + ;; TODO: Contribute a patch to python/Makefile.am to + ;; automate this. + (copy-file "python/tools/dhtcluster.py" dhtcluster) + (chmod dhtcluster #o555) + (wrap-program dhtcluster + `("GUIX_PYTHONPATH" prefix (,site-packages))))))))) + (inputs (list bash-minimal fmt readline)) (propagated-inputs - (list gnutls ;included in opendht/crypto.h - msgpack ;included in several installed headers - restinio)) ;included in opendht/http.h + (list msgpack ;included in several installed headers + restinio ;included in opendht/http.h + ;; The following are listed in the 'Requires.private' field of + ;; opendht.pc: + argon2 + gnutls + jsoncpp + nettle + openssl)) ;required for the DHT proxy (native-inputs (list autoconf automake @@ -3393,50 +3441,6 @@ and targeted primarily for asynchronous processing of HTTP-requests.") python-cython libtool cppunit)) - (arguments - `(#:imported-modules ((guix build python-build-system) ;for site-packages - ,@%cmake-build-system-modules) - #:modules (((guix build python-build-system) #:prefix python:) - (guix build cmake-build-system) - (guix build utils)) - #:tests? #f ; Tests require network connection. - #:configure-flags - '( ;;"-DOPENDHT_TESTS=on" - "-DOPENDHT_STATIC=off" - "-DOPENDHT_TOOLS=on" - "-DOPENDHT_PYTHON=on" - "-DOPENDHT_PROXY_SERVER=on" - "-DOPENDHT_PUSH_NOTIFICATIONS=on" - "-DOPENDHT_PROXY_SERVER_IDENTITY=on" - "-DOPENDHT_PROXY_CLIENT=on") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-python-installation-prefix - ;; Specify the installation prefix for the compiled Python module - ;; that would otherwise attempt to installs itself to Python's own - ;; site-packages directory. - (lambda* (#:key inputs outputs #:allow-other-keys) - (substitute* "python/CMakeLists.txt" - (("--root=\\\\\\$ENV\\{DESTDIR\\}") - (string-append "--root=/ --single-version-externally-managed " - "--prefix=${CMAKE_INSTALL_PREFIX}"))))) - (add-after 'unpack 'specify-runpath-for-python-module - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* "python/setup.py.in" - (("extra_link_args=\\[(.*)\\]" _ args) - (string-append "extra_link_args=[" args - ", '-Wl,-rpath=" out "/lib']")))))) - (add-after 'install 'move-and-wrap-tools - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (tools (assoc-ref outputs "tools")) - (site-packages (python:site-packages inputs outputs))) - (mkdir tools) - (rename-file (string-append out "/bin") - (string-append tools "/bin")) - (wrap-program (string-append tools "/bin/dhtcluster") - `("GUIX_PYTHONPATH" prefix (,site-packages))))))))) (home-page "https://github.com/savoirfairelinux/opendht/") (synopsis "Lightweight Distributed Hash Table (DHT) library") (description "OpenDHT provides an easy to use distributed in-memory data |