diff mbox

Add opendht.

Message ID 87fusrpdgz.fsf@openmailbox.org
State New
Headers show

Commit Message

Lukas Gradl June 5, 2016, 8:50 p.m. UTC
Leo Famulari <leo@famulari.name> writes:

> On Fri, Jun 03, 2016 at 10:27:32AM -0500, Lukas Gradl wrote:
>> Leo Famulari <leo@famulari.name> writes:
>> > On Tue, May 31, 2016 at 09:17:29AM -0500, Lukas Gradl wrote:
>> >> * gnu/packages/telephony.scm (opendht): New variable.
>> >
>> > I wonder if there is a better module? Distributed hash tables aren't
>> > specific to telephony.
>> 
>> I am thinking about putting it in crypto.scm.  Do you think that is more
>> appropriate? 
>
> I didn't find any module that fits perfectly. The networking module is
> another option in my opinion. I leave it up to you.
>

OK. I went with crypto.scm, but I do not have a strong opinion here.

>> > I think we should delete the bundled library in an origin snippet and
>> > make opendht use an external package.
>> 
>> Oops! Sorry that I missed that.  I looked onto that and argon2 bundles
>> blake2.  I am working on patches for the two of those right now.
>
> Thanks! I know it means more work :)

I sent a patch for argon2.  I think it actually does not bundle blake2
but rather provide its own implementation.

Attached is an updated patch.

Thank you!

Comments

Leo Famulari June 25, 2016, 3:31 p.m. UTC | #1
On Sun, Jun 05, 2016 at 03:50:20PM -0500, Lukas Gradl wrote:
> Attached is an updated patch.

Pushed as 893d963a, thanks!

> 
> Thank you!
> 
>
Lukas Gradl June 25, 2016, 4:41 p.m. UTC | #2
Leo Famulari <leo@famulari.name> writes:

> On Sun, Jun 05, 2016 at 03:50:20PM -0500, Lukas Gradl wrote:
>> Attached is an updated patch.
>
> Pushed as 893d963a, thanks!


Thank you!
diff mbox

Patch

From 5db0a8a59fa5a298cf15ec30194d0ba947f1c76c Mon Sep 17 00:00:00 2001
From: Lukas Gradl <lgradl@openmailbox.org>
Date: Sun, 5 Jun 2016 15:36:55 -0500
Subject: [PATCH] gnu: Add opendht.

* gnu/packages/crypto.scm (opendht): New variable.
---
 gnu/packages/crypto.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 08eb146..965cc71 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -2,6 +2,7 @@ 
 ;;; Copyright © 2014 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,8 +21,14 @@ 
 
 (define-module (gnu packages crypto)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages libbsd)
+  #:use-module (gnu packages nettle)
+  #:use-module (gnu packages password-utils)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages serialization)
+  #:use-module (gnu packages tls)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -88,3 +95,55 @@  OpenBSD tool of the same name.")
                    (non-copyleft "file://base64.c"
                                  "See base64.c in the distribution for
                                  the license from IBM.")))))
+
+
+(define-public opendht
+  (package
+    (name "opendht")
+    (version "0.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://github.com/savoirfairelinux/" name
+         "/archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (delete-file-recursively "src/argon2")
+           (substitute* "src/Makefile.am"
+             (("./argon2/libargon2.la") "")
+             (("SUBDIRS = argon2") ""))
+           (substitute* "src/crypto.cpp"
+             (("argon2/argon2.h") "argon2.h"))
+           (substitute* "configure.ac"
+             (("src/argon2/Makefile") ""))))
+       (sha256
+        (base32
+         "09yvkmbqbym3b5md4n96qc1s9sf2n8ji404hagih45rmsj49599x"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("gnutls" ,gnutls)
+       ("nettle" ,nettle)
+       ("msgpack" ,msgpack)
+       ("readline" ,readline)
+       ("argon2" ,argon2)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("pkg-config" ,pkg-config)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (arguments
+     `(#:configure-flags '("--disable-tools" "--disable-python")
+       #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'autoconf
+                    (lambda _
+                      (zero? (system* "autoreconf" "-vfi")))))))
+    (home-page "https://github.com/savoirfairelinux/opendht/")
+    (synopsis "Distributed Hash Table (DHT) library")
+    (description "OpenDHT is a Distributed Hash Table (DHT) library.  It may
+be used to manage peer-to-peer network connections as needed for real time
+communication.")
+    (license gpl3)))
-- 
2.7.4