>From b61ac13661a9188394285ac83991d5eb3853d1d6 Mon Sep 17 00:00:00 2001
From: Adonay Felipe Nogueira
Date: Sat, 24 Jun 2017 12:02:01 -0300
Subject: [PATCH] gnu: argon2: Update to 20161029-4.9e3ae0f.
* gnu/packages/password-utils.scm (argon2): Update to 20161029-4.9e3ae0f.
---
gnu/packages/password-utils.scm | 94 +++++++++++++++++++++++++++--------------
1 file changed, 62 insertions(+), 32 deletions(-)
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 9cfacdb..0c56acc 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2017 Leo Famulari
;;; Copyright © 2017 Clément Lassieur
;;; Copyright © 2017 Tobias Geerinckx-Rice
+;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,6 +29,7 @@
(define-module (gnu packages password-utils)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix download)
@@ -346,39 +348,67 @@ through the pass command.")
(license license:gpl2+)))
(define-public argon2
- (package
- (name "argon2")
- (version "20161029")
- (source
- (origin
- (method url-fetch)
- (uri
- (string-append "https://github.com/P-H-C/phc-winner-argon2/archive/"
- version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1rymikbysasdadm325jx69i0q19d9srqkny69jwmhswlidr4j07y"))))
- (build-system gnu-build-system)
- (arguments
- `(#:test-target "test"
- #:make-flags '("CC=gcc")
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'install
- (lambda _
- (let ((out (assoc-ref %outputs "out")))
- (install-file "argon2" (string-append out "/bin"))
- (install-file "libargon2.a" (string-append out "/lib"))
- (install-file "libargon2.so" (string-append out "/lib"))
- (copy-recursively "include"
- (string-append out "/include"))))))))
- (home-page "https://www.argon2.com/")
- (synopsis "Password hashing library")
- (description "Argon2 provides a key derivation function that was declared
+ (let ((release "20161029")
+ (commit "9e3ae0f5e91eced6de3c28a9b61f2d91200119e3")
+ (revision 4))
+ (package
+ (name "argon2")
+ (version (if (zero? revision)
+ release
+ (string-append release "-"
+ (number->string revision)
+ "." (string-take commit 7))))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/P-H-C/phc-winner-argon2/archive/"
+ commit ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (substitute* "Makefile"
+ (("ifneq \\(\\$\\(OPTTEST\\), 0\\)")
+ "ifneq (1, 0)"))))
+ (sha256
+ (base32
+ "122rpbrl2lbhgwj7sanbgyn81dnp3azr8ydxr5sc0rwqlyg3iqdp"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:test-target "test"
+ #:make-flags '("CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'fix-pkg-config-and-makefile
+ (lambda _
+ (substitute* "libargon2.pc"
+ (("/usr")
+ (assoc-ref %outputs "out"))
+ (("@HOST_MULTIARCH@")
+ ,(or (%current-target-system)
+ (%current-system)))
+ (("@UPSTREAM_VER@")
+ ,release))))
+ (replace 'install
+ (lambda _
+ (let ((out (assoc-ref %outputs "out")))
+ (install-file "argon2"
+ (string-append out "/bin"))
+ (install-file "libargon2.a"
+ (string-append out "/lib"))
+ (install-file "libargon2.so.0"
+ (string-append out "/lib"))
+ (install-file "libargon2.pc"
+ (string-append out "/lib/pkgconfig"))
+ (copy-recursively "include"
+ (string-append out "/include"))
+ (symlink (string-append out "/lib/libargon2.so.0")
+ (string-append out "/lib/libargon2.so"))))))))
+ (home-page "https://www.argon2.com/")
+ (synopsis "Password hashing library")
+ (description "Argon2 provides a key derivation function that was declared
winner of the 2015 Password Hashing Competition.")
- (license license:cc0)))
+ (license license:cc0))))
(define-public python-bcrypt
(package
--
1.9.1