From patchwork Sat Apr 20 01:07:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christopher Marusich X-Patchwork-Id: 9600 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0ADBB16ECD; Sat, 20 Apr 2019 02:09:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id CACAC16EA1 for ; Sat, 20 Apr 2019 02:09:26 +0100 (BST) Received: from localhost ([127.0.0.1]:35163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHeVS-0001MK-Dr for patchwork@mira.cbaines.net; Fri, 19 Apr 2019 21:09:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHeV7-00017s-4S for guix-patches@gnu.org; Fri, 19 Apr 2019 21:09:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHeV5-0003cL-LT for guix-patches@gnu.org; Fri, 19 Apr 2019 21:09:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hHeV5-0003cF-Hx for guix-patches@gnu.org; Fri, 19 Apr 2019 21:09:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hHeV5-0006ay-Bs for guix-patches@gnu.org; Fri, 19 Apr 2019 21:09:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35333] [PATCH 2/6] gnu: Add python-pyscard and python2-pyscard. Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Apr 2019 01:09:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35333 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35333@debbugs.gnu.org Received: via spool by 35333-submit@debbugs.gnu.org id=B35333.155572252525274 (code B ref 35333); Sat, 20 Apr 2019 01:09:03 +0000 Received: (at 35333) by debbugs.gnu.org; 20 Apr 2019 01:08:45 +0000 Received: from localhost ([127.0.0.1]:45104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHeUj-0006ZJ-C4 for submit@debbugs.gnu.org; Fri, 19 Apr 2019 21:08:45 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hHeUd-0006Yc-SN for 35333@debbugs.gnu.org; Fri, 19 Apr 2019 21:08:37 -0400 Received: by mail-pl1-f195.google.com with SMTP id t16so3267069plo.0 for <35333@debbugs.gnu.org>; Fri, 19 Apr 2019 18:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BRm7uUCalrKLA7wEsMDOKKXQhlDUXz/PZ73iNBzcVis=; b=UwY50X+qoMet/UCdVk3Pgf5L71IBfnljCODwABGSGZ5EmrSjSJBd09yz7DMotkEUrK XjkLS8EkLRBVMW9PPhG4HkR5BEtZJ9bprmGRI9VLY/1XV7pJ8JI/woofBEHuPKqklcA5 rw9F6s9ovCZnlMcyCyWL0NN73EsY2e9LFBM4I+RJx7mE3FVDWFFdwyM2pp7UrhJ4V6C+ DwD4uWde5AFp8nihOvBtlwoBq657eS+ApLaeLAr7MrVBmJca5Z5y24yQSwDex/DSOzVG w2Dyb3TJ7kaRWgUScgr+XGMVke3MXJz626MToG7MgixruHolt93WwsvY8B8KWyfbn9C5 sdsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BRm7uUCalrKLA7wEsMDOKKXQhlDUXz/PZ73iNBzcVis=; b=XLye9YbEugO6lEwX52y3HIaUuDhebUfr3zj33wSgQUE/441C/Gb7GUTZOZ0jxroQ3d 9GM0GL8LkatnZlPtbGMUcY//R+IXU7GCxGQCt/mTXwsNFXagPF5IG+yUbCCaqYhFdcnC UVjZRDku4AcodB7gTjBLcIv83jRz2s9z5Wfm2DQzJ1IAmE2yzckkBUtd+OhdDhHKGY+u gW6wHNLIVoIrM6M+tMPvU0hTu4OjcqCdCLFlvPxKqKINXfUdF+3TwMnO9Cq1erbwvVtS wRFpHi4QYaYwnQyP96WGxOeBGQqO/gF4wTw6VbYZ0DFhtWegOV8RPyWfR8QMiiVWVlPF PsjQ== X-Gm-Message-State: APjAAAVO+zACBjlw6/G2Xd2d4ip6U7w5ESUSOiFFQM5gb65OhbE+naKh 2+svIuOgiwk1FrIlvn3EuIQpubnJ X-Google-Smtp-Source: APXvYqx7rHWMNtW93tdmgrJTCS/3Yh0WJszqfRUBZ8E0HEQ5+b7lp4OdibZkQPllsSyW+8iz/o+i6g== X-Received: by 2002:a17:902:2862:: with SMTP id e89mr7058120plb.203.1555722509779; Fri, 19 Apr 2019 18:08:29 -0700 (PDT) Received: from garuda.lan ([2601:601:9d80:25b2::fa8]) by smtp.gmail.com with ESMTPSA id h16sm8876885pgj.85.2019.04.19.18.08.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 18:08:28 -0700 (PDT) From: Chris Marusich Date: Fri, 19 Apr 2019 18:07:56 -0700 Message-Id: <20190420010800.5741-3-cmmarusich@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190420010800.5741-1-cmmarusich@gmail.com> References: <20190420003814.5120-1-cmmarusich@gmail.com> <20190420010800.5741-1-cmmarusich@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Marusich Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/security-token.scm (python-pyscard, python2-pyscard): New variables. --- gnu/packages/security-token.scm | 59 ++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm index c88a1c6b2a..52bd80780c 100644 --- a/gnu/packages/security-token.scm +++ b/gnu/packages/security-token.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2017 Thomas Danckaert ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2017 Ricardo Wurmus -;;; Copyright © 2018 Chris Marusich +;;; Copyright © 2018, 2019 Chris Marusich ;;; Copyright © 2018 Arun Isaac ;;; ;;; This file is part of GNU Guix. @@ -32,6 +32,7 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) + #:use-module (guix build-system python) #:use-module (gnu packages autotools) #:use-module (gnu packages curl) #:use-module (gnu packages check) @@ -51,6 +52,8 @@ #:use-module (gnu packages tex) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages swig) #:use-module (gnu packages web) #:use-module (gnu packages xml)) @@ -341,3 +344,57 @@ and other operations. It includes a library and a command-line tool.") line tools for personalizing YubiKeys. You can use these to set an AES key, retrieve a YubiKey's serial number, and so forth.") (license license:bsd-2))) + +(define-public python-pyscard + (package + (name "python-pyscard") + (version "1.9.8") + (source (origin + (method url-fetch) + ;; The maintainer publishes releases on various sites, but + ;; SourceForge is apparently the only one with a signed release. + (uri (string-append + "mirror://sourceforge/pyscard/pyscard/pyscard%20" + version "/pyscard-" version ".tar.gz")) + (sha256 + (base32 + "15fh00z1an6r5j7hrz3jlq0rb3jygwf3x4jcwsa008bv8vpcg7gm")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Tell pyscard where to find the PCSC include directory. + (add-after 'unpack 'patch-platform-include-dirs + (lambda* (#:key inputs #:allow-other-keys) + (let ((pcsc-include-dir (string-append + (assoc-ref inputs "pcsc-lite") + "/include/PCSC"))) + (substitute* "setup.py" + (("platform_include_dirs = \\[.*?\\]") + (string-append + "platform_include_dirs = ['" pcsc-include-dir "']"))) + #t))) + ;; pyscard wants to dlopen libpcsclite, so tell it where it is. + (add-after 'unpack 'patch-dlopen + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "smartcard/scard/winscarddll.c" + (("lib = \"libpcsclite\\.so\\.1\";") + (simple-format #f + "lib = \"~a\";" + (string-append (assoc-ref inputs "pcsc-lite") + "/lib/libpcsclite.so.1")))) + #t))))) + (inputs + `(("pcsc-lite" ,pcsc-lite))) + (native-inputs + `(("swig" ,swig))) + (home-page "https://github.com/LudovicRousseau/pyscard") + (synopsis "Smart card library for Python") + (description + "The pyscard smart card library is a framework for building smart card +aware applications in Python. The smart card module is built on top of the +PCSC API Python wrapper module.") + (license license:lgpl2.1+))) + +(define-public python2-pyscard + (package-with-python2 python-pyscard))