From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] gnu: Add eschalot. Date: Tue, 30 Aug 2016 12:34:38 -0500 Message-ID: <20160830123438.3e8bdda5@openmailbox.org> References: <87eg5blecv.fsf@we.make.ritual.n0.is> <20160830071132.GD4193@jasmine> <877faypl6q.fsf@we.make.ritual.n0.is> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bemw1-0004pR-Iy for guix-devel@gnu.org; Tue, 30 Aug 2016 13:34:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bemvw-0002nJ-Lz for guix-devel@gnu.org; Tue, 30 Aug 2016 13:34:52 -0400 Received: from smtp5.openmailbox.org ([62.4.1.39]:56934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bemvw-0002n2-7g for guix-devel@gnu.org; Tue, 30 Aug 2016 13:34:48 -0400 In-Reply-To: <877faypl6q.fsf@we.make.ritual.n0.is> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: ng0 Cc: guix-devel@gnu.org On Tue, 30 Aug 2016 11:09:49 +0000 ng0 wrote: > From a95d7059ea452c9fe9b8d148c33e0d77fbbffc04 Mon Sep 17 00:00:00 2001 > From: ng0 > Date: Fri, 26 Aug 2016 15:41:33 +0000 > Subject: [PATCH] gnu: Add eschalot. >=20 > * gnu/packages/crypto.scm (eschalot): New variable. > --- > gnu/packages/crypto.scm | 55 +++++++++++++++++++++++++++++++++++++++++++= ++++++ > 1 file changed, 55 insertions(+) >=20 > diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm > index 5dad97c..be55a1d 100644 > --- a/gnu/packages/crypto.scm > +++ b/gnu/packages/crypto.scm > @@ -4,6 +4,7 @@ > ;;; Copyright =C2=A9 2016 Leo Famulari > ;;; Copyright =C2=A9 2016 Lukas Gradl > ;;; Copyright =C2=A9 2016 Tobias Geerinckx-Rice > +;;; Copyright =C2=A9 2016 ng0 > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -37,6 +38,7 @@ > #:use-module ((guix licenses) #:prefix license:) > #:use-module (guix packages) > #:use-module (guix download) > + #:use-module (guix git-download) > #:use-module (guix build-system gnu)) > =20 > (define-public libsodium > @@ -263,3 +265,56 @@ gain and retain the authorization and encryption key= s required to perform > secure operations. ") > (license (list license:lgpl2.1+ ; the files keyutils.* > license:gpl2+)))) ; the rest > + > +;; There is no release candidate but commits point out a version number. The README mentions tarballs. Are they not available anywhere? I couldn't seem to access the .onion address mentioned on the github page. > +(define-public eschalot > + (let ((commit "0bf31d88a11898c19b1ed25ddd2aff7b35dbac44") > + (revision "1")) > + (package > + (name "eschalot") > + (version (string-append "1.2.0-" revision "." (string-take commit = 7))) > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/schnabear/eschalot") > + (commit commit))) > + (sha256 > + (base32 > + "0lj38ldh8vzi11wp4ghw4k0fkwp0s04zv8k8d473p1snmbh7mx98")))) > + (inputs > + `(("openssl" ,openssl))) ; It needs: openssl/{bn,pem,rsa,sha}.h > + (build-system gnu-build-system) > + (arguments > + `(#:make-flags (list "CC=3Dgcc" > + (string-append "PREFIX=3D" (assoc-ref %outpu= ts "out")) > + (string-append "INSTALL=3D" "install")) > + ;; XXX: make test would run a !VERY! long hashing of names with= the use > + ;; of a wordlist, the amount of computing time this would waste= on build > + ;; servers is in no relation to the size or importance of this = small > + ;; application, therefore we disable the tests. > + ;; TODO: Patch the Makefile to run a modified test phase which = runs a > + ;; reasonable amount of hashes. > + #:tests? #f How about something simple like: (replace 'check (lambda _ (zero? (system* "./eschalot" "-r" "^guix|^guixsd")))) That command returns in under .3s on my i5. I suppose it could be expanded to test the wordlist capabilities. > + #:phases > + (modify-phases %standard-phases > + (replace 'configure > + (lambda _ > + (substitute* "Makefile" > + (("/bin/rm") "rm")))) I think this phase could simply be removed. The RM variable is only referenced in the 'clean' and 'cleantest' targets, which aren't made. If it's really necessary, "RM=3Drm" could simply be added to #:make-flags. > + ;; Make install can not create the bin dir. Create it. > + (add-before 'install 'create-bin-dir > + (lambda* (#:key outputs inputs #:allow-other-keys) ^ The 'inputs' variable is not referenced in this phase, and can be left out. Otherwise looks good, `~Eric