From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCNeB-0004DE-4s for guix-patches@gnu.org; Sat, 28 Apr 2018 07:04:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCNe6-00005R-WA for guix-patches@gnu.org; Sat, 28 Apr 2018 07:04:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCNe6-00005K-Qw for guix-patches@gnu.org; Sat, 28 Apr 2018 07:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fCNe6-0008Iw-Cf for guix-patches@gnu.org; Sat, 28 Apr 2018 07:04:02 -0400 Subject: [bug#31298] [PATCH 1/2] gnu: Add opensc. Resent-Message-ID: From: Chris Marusich Date: Sat, 28 Apr 2018 04:02:40 -0700 Message-Id: <20180428110241.18273-1-cmmarusich@gmail.com> In-Reply-To: <20180428105713.18157-1-cmmarusich@gmail.com> References: <20180428105713.18157-1-cmmarusich@gmail.com> 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: 31298@debbugs.gnu.org Cc: Chris Marusich * gnu/packages/security-token.scm (opensc): New variable. --- gnu/packages/security-token.scm | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index 6ff83ce5a..305e3d8a4 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2018 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +32,7 @@ #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages autotools) #:use-module (gnu packages curl) + #:use-module (gnu packages docbook) #:use-module (gnu packages gettext) #:use-module (gnu packages gtk) #:use-module (gnu packages libusb) @@ -38,6 +40,7 @@ #:use-module (gnu packages man) #:use-module (gnu packages networking) #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages readline) #:use-module (gnu packages tls) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -202,3 +205,51 @@ one-time-password (OTP) YubiKey against Yubico’s servers. See the Yubico website for more information about Yubico and the YubiKey.") (home-page "https://developers.yubico.com/yubico-c-client/") (license license:bsd-2))) + +(define-public opensc + (package + (name "opensc") + (version "0.17.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/OpenSC/OpenSC/releases/download/" + version "/opensc-" version ".tar.gz")) + (sha256 + (base32 + "0043jh5g7q2lyd5vnb0akwb5y349isx7vbm9wqhlgav7d20wcwxy")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; By setting an absolute path here, we arrange for OpenSC to + ;; successfully dlopen libpcsclite.so.1 by default. The user can + ;; still override this if they want to, by specifying a custom OpenSC + ;; configuration file at runtime. + (add-after 'unpack 'set-default-libpcsclite.so.1-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((libpcsclite (string-append (assoc-ref inputs "pcsc-lite") + "/lib/libpcsclite.so.1"))) + (substitute* "configure" + (("DEFAULT_PCSC_PROVIDER=\"libpcsclite\\.so\\.1\"") + (string-append + "DEFAULT_PCSC_PROVIDER=\"" libpcsclite "\""))) + #t)))))) + (inputs + `(("readline" ,readline) + ("openssl" ,openssl) + ("pcsc-lite" ,pcsc-lite) + ("ccid" ,ccid))) + (native-inputs + `(("libxslt" ,libxslt) + ("docbook-xsl" ,docbook-xsl) + ("pkg-config" ,pkg-config))) + (home-page "https://github.com/OpenSC/OpenSC/wiki") + (synopsis "Tools and libraries related to smart cards") + (description + "OpenSC is a set of software tools and libraries to work with smart +cards, with the focus on smart cards with cryptographic capabilities. OpenSC +facilitate the use of smart cards in security applications such as +authentication, encryption and digital signatures. OpenSC implements the PKCS +#15 standard and the PKCS #11 API.") + (license license:lgpl2.1+))) -- 2.17.0