From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1HwQ-0006nW-6w for guix-patches@gnu.org; Wed, 28 Mar 2018 16:45:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1HwN-0001dk-0J for guix-patches@gnu.org; Wed, 28 Mar 2018 16:45:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49806) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1HwM-0001dg-SO for guix-patches@gnu.org; Wed, 28 Mar 2018 16:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f1HwM-00015o-IW for guix-patches@gnu.org; Wed, 28 Mar 2018 16:45:02 -0400 Subject: [bug#30979] [PATCH] gnu: Add botan. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1HvW-0006Ga-Dj for guix-patches@gnu.org; Wed, 28 Mar 2018 16:44:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1HvT-0001PE-72 for guix-patches@gnu.org; Wed, 28 Mar 2018 16:44:10 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:41961) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f1HvS-0001P6-Pl for guix-patches@gnu.org; Wed, 28 Mar 2018 16:44:06 -0400 Received: from jasmine.lan (c-76-124-202-137.hsd1.pa.comcast.net [76.124.202.137]) by mail.messagingengine.com (Postfix) with ESMTPA id 7874C10253 for ; Wed, 28 Mar 2018 16:44:05 -0400 (EDT) From: Leo Famulari Date: Wed, 28 Mar 2018 16:44:01 -0400 Message-Id: <458aa3e04b0564c17d4035991acf910ed98b70fb.1522269840.git.leo@famulari.name> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30979@debbugs.gnu.org * gnu/packages/crypto.scm (botan): New variable. --- gnu/packages/crypto.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index fd7a48c2f..da081fbef 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson ;;; Copyright © 2015, 2017 Ricardo Wurmus -;;; Copyright © 2016, 2017 Leo Famulari +;;; Copyright © 2016, 2017, 2018 Leo Famulari ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2017 Nils Gillmann @@ -34,10 +34,10 @@ #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages cryptsetup) + #:use-module (gnu packages databases) #:use-module (gnu packages gettext) #:use-module (gnu packages gnupg) #:use-module (gnu packages image) - #:use-module (gnu packages pkg-config) #:use-module (gnu packages libbsd) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) @@ -45,6 +45,8 @@ #:use-module (gnu packages password-utils) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages search) #:use-module (gnu packages serialization) @@ -711,3 +713,56 @@ of magnet links and a wide range of hash sums like CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, AICH, ED2K, Tiger, DC++ TTH, BitTorrent BTIH, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R, Whirlpool and Snefru.") (license (license:non-copyleft "file://COPYING")))) + +(define-public botan + (package + (name "botan") + (version "2.4.0") + (source (origin + (method url-fetch) + (uri (string-append "https://botan.randombit.net/releases/" + "Botan-" version ".tgz")) + (sha256 + (base32 + "1988crh5lipmfcd1icldf6hchi9vcy08yymxv79lrvnglpi6957d")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'build 'fix-rst2man-invocation + (lambda _ + ;; XXX Reported upstream: + ;; + (substitute* "src/scripts/build_docs.py" + (("'rst2man'")"'rst2man.py'")) + #t)) + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out")) + (lib (string-append out "/lib"))) + (invoke "python" "./configure.py" + (string-append "--prefix=" out) + ;; Otherwise, the `botan` executable cannot find + ;; libbotan. + (string-append "--ldflags=-Wl,-rpath=" lib) + "--with-rst2man" + ;; Recommended by upstream + "--with-zlib" "--with-bzip2" "--with-sqlite3")))) + (replace 'check + (lambda _ (invoke "./botan-test")))))) + (native-inputs + `(("python" ,python-minimal-wrapper) + ("python-docutils" ,python-docutils))) + (inputs + `(("sqlite" ,sqlite) + ("bzip2" ,bzip2) + ("zlib" ,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, +PKIX certificate handling, PKCS#11 and TPM hardware support, password hashing, +and post-quantum crypto schemes. In addition to the C++, botan has a C89 API +specifically designed to be easy to call from other languages. A Python binding +using ctypes is included, and several other language bindings are available.") + (home-page "https://botan.randombit.net") + (license license:bsd-2))) -- 2.16.3