3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

gnu: opendht: Update to 2.3.4.

* gnu/packages/networking.scm (opendht): Update to 2.3.4.
This commit is contained in:
Maxim Cournoyer 2022-03-08 13:21:20 -05:00
parent 0d14f8a870
commit 59001c4f91
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -3396,92 +3396,87 @@ and targeted primarily for asynchronous processing of HTTP-requests.")
(license license:bsd-3))) (license license:bsd-3)))
(define-public opendht (define-public opendht
;; The version/commit is kept in sync with what Jami uses in its daemon (package
;; contrib build system (see: (name "opendht")
;; https://review.jami.net/plugins/gitiles/jami-daemon/+/refs/heads/master/contrib/src/opendht/rules.mak). (version "2.3.4")
(let ((commit "dbbfdaab0f4119abf79646313e0dbc52881dcd56") (source (origin
(revision "0")) (method git-fetch)
(package (uri (git-reference
(name "opendht") (url "https://github.com/savoirfairelinux/opendht")
(version (git-version "2.3.1" revision commit)) (commit version)))
(source (origin (file-name (git-file-name name version))
(method git-fetch) (sha256
(uri (git-reference (base32
(url "https://github.com/savoirfairelinux/opendht") "0gp1wdpk50y0pcvlhqfw9vpms8lsrjvv63x4dh40axsvf2ix9lkj"))))
(commit commit))) (outputs '("out" "tools" "debug"))
(file-name (git-file-name name version)) (build-system gnu-build-system)
(sha256 (arguments
(base32 (list
"07x8vw999qpfl6qwj5k5l2mcjy1vp32sd567f6imbsnh9vlx2bdv")))) #:imported-modules `((guix build python-build-system) ;for site-packages
(outputs '("out" "tools" "debug")) ,@%gnu-build-system-modules)
(build-system gnu-build-system) #:modules '(((guix build python-build-system) #:prefix python:)
(arguments (guix build gnu-build-system)
(list (guix build utils))
#:imported-modules `((guix build python-build-system) ;for site-packages #:tests? #f ;tests require networking
,@%gnu-build-system-modules) #:configure-flags
#:modules '(((guix build python-build-system) #:prefix python:) #~(list "--enable-tests"
(guix build gnu-build-system) "--enable-proxy-server"
(guix build utils)) "--enable-push-notifications"
#:tests? #f ;tests require networking "--enable-proxy-server-identity"
#:configure-flags "--enable-proxy-client")
#~(list "--enable-tests" #:phases
"--enable-proxy-server" #~(modify-phases %standard-phases
"--enable-push-notifications" (add-after 'unpack 'fix-python-installation-prefix
"--enable-proxy-server-identity" ;; Specify the installation prefix for the compiled Python module
"--enable-proxy-client") ;; that would otherwise attempt to installs itself to Python's own
#:phases ;; site-packages directory.
#~(modify-phases %standard-phases (lambda _
(add-after 'unpack 'fix-python-installation-prefix (substitute* "python/Makefile.am"
;; Specify the installation prefix for the compiled Python module (("--root=\\$\\(DESTDIR)/")
;; that would otherwise attempt to installs itself to Python's own (string-append "--root=/ --single-version-externally-managed "
;; site-packages directory. "--prefix=" #$output)))))
(lambda _ (add-after 'unpack 'specify-runpath-for-python-module
(substitute* "python/Makefile.am" (lambda _
(("--root=\\$\\(DESTDIR)/") (substitute* "python/setup.py.in"
(string-append "--root=/ --single-version-externally-managed " (("extra_link_args=\\[(.*)\\]" _ args)
"--prefix=" #$output))))) (string-append "extra_link_args=[" args
(add-after 'unpack 'specify-runpath-for-python-module ", '-Wl,-rpath=" #$output "/lib']")))))
(lambda _ (add-after 'install 'move-and-wrap-tools
(substitute* "python/setup.py.in" (lambda* (#:key inputs outputs #:allow-other-keys)
(("extra_link_args=\\[(.*)\\]" _ args) (let* ((tools (assoc-ref outputs "tools"))
(string-append "extra_link_args=[" args (dhtcluster (string-append tools "/bin/dhtcluster"))
", '-Wl,-rpath=" #$output "/lib']"))))) (site-packages (python:site-packages inputs outputs)))
(add-after 'install 'move-and-wrap-tools (mkdir tools)
(lambda* (#:key inputs outputs #:allow-other-keys) (rename-file (string-append #$output "/bin")
(let* ((tools (assoc-ref outputs "tools")) (string-append tools "/bin"))
(dhtcluster (string-append tools "/bin/dhtcluster")) ;; TODO: Contribute a patch to python/Makefile.am to
(site-packages (python:site-packages inputs outputs))) ;; automate this.
(mkdir tools) (copy-file "python/tools/dhtcluster.py" dhtcluster)
(rename-file (string-append #$output "/bin") (chmod dhtcluster #o555)
(string-append tools "/bin")) (wrap-program dhtcluster
;; TODO: Contribute a patch to python/Makefile.am to `("GUIX_PYTHONPATH" prefix (,site-packages)))))))))
;; automate this. (inputs (list bash-minimal fmt readline))
(copy-file "python/tools/dhtcluster.py" dhtcluster) (propagated-inputs
(chmod dhtcluster #o555) (list msgpack ;included in several installed headers
(wrap-program dhtcluster restinio ;included in opendht/http.h
`("GUIX_PYTHONPATH" prefix (,site-packages))))))))) ;; The following are listed in the 'Requires.private' field of
(inputs (list bash-minimal fmt readline)) ;; opendht.pc:
(propagated-inputs argon2
(list msgpack ;included in several installed headers gnutls
restinio ;included in opendht/http.h jsoncpp
;; The following are listed in the 'Requires.private' field of nettle
;; opendht.pc: openssl)) ;required for the DHT proxy
argon2 (native-inputs
gnutls (list autoconf
jsoncpp automake
nettle pkg-config
openssl)) ;required for the DHT proxy python
(native-inputs python-cython
(list autoconf libtool
automake cppunit))
pkg-config (home-page "https://github.com/savoirfairelinux/opendht/")
python (synopsis "Lightweight Distributed Hash Table (DHT) library")
python-cython (description "OpenDHT provides an easy to use distributed in-memory data
libtool
cppunit))
(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
store. Every node in the network can read and write values to the store. store. Every node in the network can read and write values to the store.
Values are distributed over the network, with redundancy. It includes the Values are distributed over the network, with redundancy. It includes the
following features: following features:
@ -3504,7 +3499,7 @@ library (get, put, etc.) with text values.
@item dhtchat @item dhtchat
A very simple IM client working over the DHT. A very simple IM client working over the DHT.
@end table") @end table")
(license license:gpl3+)))) (license license:gpl3+)))
(define-public frrouting (define-public frrouting
(package (package