LibDecaf

DoneSubmitted by Raghav Gururajan.
Details
3 participants
  • Jakub Kądziołka
  • Raghav Gururajan
  • Raghav Gururajan
Owner
unassigned
Severity
normal
R
R
Raghav Gururajan wrote on 27 Mar 2020 23:28
gnu: packages: crypto: Add libdecaf
(address . guix-patches@gnu.org)
82283f5b8a03732fd615c0c8a63beaac@disroot.org
Hello Guix!

Please find the attached patch to add "libdecaf" package.

Regards,
RG.
Attachment: libdecaf.patch
J
J
Jakub Kądziołka wrote on 1 Jun 2020 23:12
(name . Raghav Gururajan)(address . raghavgururajan@disroot.org)(address . guix-patches@gnu.org)
20200601211250.fnrczglfpknvdzf5@gravity
On Fri, Mar 27, 2020 at 10:28:43PM +0000, Raghav Gururajan wrote:
Toggle quote (7 lines)
> Hello Guix!
>
> Please find the attached patch to add "libdecaf" package.
>
> Regards,
> RG.

Thanks for the patch! If I may ask, what is the point of dot and doxygen
in the native-inputs? They don't seem to affect the result of the build
in any way.

Regards,
Jakub Kądziołka
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl7Vb1IACgkQ4xWnWEYT
FWTebhAA1dFzS+nkBmV4O10BqAm+xifrtONIOK8rS3ET9IH34389g0f48VI5UwSG
IJYbwvQ87SFk64WrOrTJPG4ssXWCs7bfkbRQSQXdRoDhXnJCa03DUxZA3xsHwNdt
9JsLUQ3blgYmFoCHICD/FT6rEFH3zrZuN9S4ucOoVh6XECWQdTBtY/8Ym78N7ZJu
J82DLoVRYM1HCr0jygKfxvq3LhRBBpwiUGy3U7OBABC7uQJ5o6g4xLMmfsBlfJWF
R+mxVdRrvlla8QK4U00zSfYBz5GPXfxG/fkjeQR+upZG/5fkhIM4t+PHVp4yCyLe
269dXVOBWoPsv3hibPwK0sQ8TmZolzt75X8qGTtWuRNYrfITSIOCGgSdky5RQjPj
BvvBQtFnFe86gJzPe+wD9kf2GKYZYb7rC4s6yzdKh9C/CGNYmPqda1zQi4BaluB1
3OCQrVod1NkFlnEBSn7MkM7sI8pLXs0bVpEXG9rm/nJcnATf0C6dpqh52rtnTIoH
IGTqomlyWbZ6YaFwvBU3U5jl6xDg+5EWXWs+M9tF1F4IAKYRrxgaONdbiz236FPR
eY0IQDkSiBVtEWWDPQxMNOyg+OaomshmTUhg8MTgzoYI+9DmGh+//8XDm/lCoNuB
Ur3j6lJi/UJKsVV7VGM3U4BVp5/SKX1mqBi3LNN8SBrYGA01/YI=
=7IZ3
-----END PGP SIGNATURE-----


R
R
Raghav Gururajan wrote on 14 Mar 2021 00:22
(address . control@debbugs.gnu.org)
4648f5ec25c0663b4ffb2da585c2a8a2@disroot.org
retitle 40263 LibDecaf
R
R
Raghav Gururajan wrote on 14 Mar 2021 00:24
94313147-99b2-80ed-1d91-80353807c877@raghavgururajan.name
Hi Jakub!

So sorry, I never received the email. Just came across your response at
https://issues.guix.gnu.org.

*** QUOTE ***
Thanks for the patch! If I may ask, what is the point of dot and
doxygenin the native-inputs? They don't seem to affect the result of the
buildin any way.
*** QUOTE ***

They are for generating documentation. It was not enabled ,but it is now
(see below).

I have revised the patch to involve the following:
[1] Update to 1.0.1.
[2] Enable documentation.
[3] Enable python binding.

Please find the attachment.

Regards,
RG.
From 8207939ae9d4a8a97db2b1ea2e7fd951e3bb676f Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sat, 13 Mar 2021 17:08:57 -0500
Subject: [PATCH] gnu: Add libdecaf.

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

Toggle diff (86 lines)
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 0000e7fbf2..3959464d56 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -47,9 +47,11 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crates-io)
   #:use-module (gnu packages cryptsetup)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages golang)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
   #:use-module (gnu packages kerberos)
   #:use-module (gnu packages libbsd)
@@ -88,6 +90,67 @@
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26))
 
+(define-public libdecaf
+  (package
+    (name "libdecaf")
+    (version "1.0.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "git://git.code.sf.net/p/ed448goldilocks/code")
+                    (commit
+                     (string-append "v" version))))
+              (file-name
+               (git-file-name name version))
+              (sha256
+               (base32 "1ajgmyvc6a4m1h2hg1g4wz7ibx10x1xys9m6ancnmmf1f2srlfly"))))
+    (build-system cmake-build-system)
+    (outputs '("out" "python" "doc"))
+    (arguments
+     `(#:configure-flags '("-DENABLE_STATIC=OFF")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-python-binding
+           (lambda _
+             (substitute* "python/setup.py"
+               (("gmake")
+                "make")
+               (("'\\.\\.', 'build', 'lib', 'libdecaf\\.so'")
+                "'..', '..', 'build', 'src', 'libdecaf.so'"))
+             #t))
+         (add-after 'install 'install-python-binding
+           (lambda* (#:key outputs #:allow-other-keys)
+             (with-directory-excursion "../source/python"
+               (invoke "python" "setup.py" "install"
+                       (string-append "--prefix=" (assoc-ref outputs "python"))
+                       "--root=/"))
+             #t))
+         (add-after 'install-python-binding 'install-documentation
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "make" "doc")
+             (let* ((doc (assoc-ref outputs "doc"))
+                    (dest (string-append doc "/share/doc")))
+               (copy-recursively "doc" dest))
+             #t)))))
+    (native-inputs
+     `(("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("python2" ,python-2.7)
+       ("python3" ,python)))
+    (synopsis "Decaf Elliptic Curve Library")
+    (description "The libdecaf library is an implementation of elliptic curve
+cryptography using the Montgomery and Edwards curves Curve25519, Ed25519,
+Ed448-Goldilocks and Curve448, using the Decaf encoding.")
+    (home-page "http://ed448goldilocks.sourceforge.net/")
+    (license
+     (list
+      ;; Library.
+      license:expat
+      ;; Binding.
+      license:bsd-2))))
+
 (define-public libsodium
   (package
     (name "libsodium")
-- 
2.30.2
Attachment: OpenPGP_signature
R
R
Raghav Gururajan wrote on 20 Mar 2021 05:50
#40263 --> #47274
(address . 40263-close@debbugs.gnu.org)
1de45c90-9529-66fd-5201-9796db6684fc@raghavgururajan.name
Hello Guix!

This patch is now a part of #47274. So I'll close.

Regards,
RG.
Attachment: OpenPGP_signature
?
Your comment

This issue is archived.

To comment on this conversation send email to 40263@debbugs.gnu.org