guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: botan: Use new style and G-Expressions.


From: guix-commits
Subject: 02/02: gnu: botan: Use new style and G-Expressions.
Date: Tue, 17 May 2022 17:08:38 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 393bcc012f7a30e9a141499d2f07d56b46354a91
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue May 17 16:04:54 2022 -0400

    gnu: botan: Use new style and G-Expressions.
    
    * gnu/packages/crypto.scm (botan)[phases]: Adjust to use gexps.
    {check}: Replace 'if' with 'when'.
    [native-inputs]: Use new style.
---
 gnu/packages/crypto.scm | 55 +++++++++++++++++++++++--------------------------
 1 file changed, 26 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 25aa745b7e..e98d9634dc 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021, 2022 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2022 Allan Adair <allan@adair.no>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -956,38 +957,34 @@ SHA256, SHA512, SHA3, AICH, ED2K, Tiger, DC++ TTH, 
BitTorrent BTIH, GOST R
                 "0q2mzzg0a40prp9gwjk7d9fn8kwj6z2x6h6mzlm0hr6sxz7h0vp2"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref %outputs "out"))
-                    (lib (string-append out "/lib")))
-               ;; Upstream tests and benchmarks with -O3.
-               (setenv "CXXFLAGS" "-O3")
-               (invoke "python" "./configure.py"
-                       (string-append "--prefix=" out)
-                       "--disable-static"
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'configure
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              ;; Upstream tests and benchmarks with -O3.
+              (setenv "CXXFLAGS" "-O3")
+              (invoke "python" "./configure.py"
+                      (string-append "--prefix=" #$output)
+                      "--disable-static"
 
-                       ;; Otherwise, the `botan` executable cannot find
-                       ;; libbotan.
-                       (string-append "--ldflags=-Wl,-rpath=" lib)
+                      ;; Otherwise, the `botan` executable cannot find
+                      ;; libbotan.
+                      (string-append "--ldflags=-Wl,-rpath=" #$output "/lib")
 
-                       "--with-os-feature=getentropy"
-                       "--with-rst2man"
+                      "--with-os-feature=getentropy"
+                      "--with-rst2man"
 
-                       ;; Recommended by upstream
-                       "--with-zlib" "--with-bzip2" "--with-sqlite3"))))
-         (add-before 'check 'library-path-for-tests
-           (lambda _ (setenv "LD_LIBRARY_PATH" (getcwd))))
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (if tests?
-                 (invoke "./botan-test")))))))
-    (native-inputs
-     `(("python" ,python-wrapper)
-       ("python-docutils" ,python-docutils)))
-    (inputs
-     (list sqlite bzip2 zlib))
+                      ;; Recommended by upstream
+                      "--with-zlib" "--with-bzip2" "--with-sqlite3")))
+          (add-before 'check 'library-path-for-tests
+            (lambda _ (setenv "LD_LIBRARY_PATH" (getcwd))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "./botan-test")))))))
+    (native-inputs (list python-wrapper python-docutils))
+    (inputs (list sqlite bzip2 zlib))
     (synopsis "Cryptographic library in C++11")
     (description "Botan is a cryptography library, written in C++11, offering
 the tools necessary to implement a range of practical systems, such as 
TLS/DTLS,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]