all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#61018] [PATCH v6 1/2] gnu: Add perl-pcsc.
       [not found] <20230227004235.26445-1-jakeleporte@outlook.com>
@ 2023-02-27  0:42 ` Jake Leporte
  2023-02-27  0:42 ` [bug#61018] [PATCH v6 2/2] gnu: Add pcsc-tools Jake Leporte
  1 sibling, 0 replies; 2+ messages in thread
From: Jake Leporte @ 2023-02-27  0:42 UTC (permalink / raw)
  To: 61018; +Cc: Jake Leporte

* gnu/packages/perl.scm (perl-pcsc): New variable.
---
 gnu/packages/perl.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index b6fb81e..a1a9983 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -86,6 +86,7 @@ (define-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sdl)
+  #:use-module (gnu packages security-token)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages video)
   #:use-module (gnu packages web)
@@ -12269,6 +12270,41 @@ (define-public perl-path-iterator-rule
 arduous to type for one-liners.")
     (license license:asl2.0)))
 
+(define-public perl-pcsc
+  (package
+    (name "perl-pcsc")
+    (version "1.4.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/W/WH/WHOM/pcsc-perl-" version
+                    ".tar.bz2"))
+              (sha256
+               (base32
+                "17f6i16jv6ci6459vh6y3sz94vgcvykjjszcl4xsykryakjvf8i7"))))
+    (build-system perl-build-system)
+    (arguments
+     (list
+           ;; The tests for this package require access to a
+           ;; card reader with a card inserted, so they won't be
+           ;; possible to run in the build environment
+           #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-dlopen
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (substitute* "PCSCperl.h"
+                              (("libpcsclite.so.1")
+                               (search-input-file inputs
+                                                  "/lib/libpcsclite.so.1"))))))))
+    (native-inputs (list pkg-config))
+    (inputs (list pcsc-lite))
+    (synopsis "Perl library for PC/SC")
+    (description
+     "This library allows communication with a smart card using PC/SC from a Perl
+script.")
+    (home-page "https://pcsc-perl.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public perl-pod-constants
   (package
     (name "perl-pod-constants")
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#61018] [PATCH v6 2/2] gnu: Add pcsc-tools.
       [not found] <20230227004235.26445-1-jakeleporte@outlook.com>
  2023-02-27  0:42 ` [bug#61018] [PATCH v6 1/2] gnu: Add perl-pcsc Jake Leporte
@ 2023-02-27  0:42 ` Jake Leporte
  1 sibling, 0 replies; 2+ messages in thread
From: Jake Leporte @ 2023-02-27  0:42 UTC (permalink / raw)
  To: 61018; +Cc: Jake Leporte

* gnu/packages/security-token.scm (pcsc-tools): New variable.
---
 gnu/packages/security-token.scm | 62 +++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index a7f5e3a..41cbafd 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -48,6 +48,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
@@ -253,6 +254,67 @@ (define-public pcsc-lite
                    license:isc                  ; src/strlcat.c src/strlcpy.c
                    license:gpl3+))))            ; src/spy/*
 
+(define-public pcsc-tools
+  (package
+    (name "pcsc-tools")
+    (version "1.6.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://salsa.debian.org/rousseau/pcsc-tools.git/")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kvw8y5289fp6y3z8l5w61gfrk872kd500a27sgr5k5dpr9vfbk"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-data-paths
+                 (lambda _
+                   (substitute* "ATR_analysis"
+                     (((string-append
+                        "\"/usr/local/pcsc/smartcard_list.txt\", "
+                        "\"/usr/share/pcsc/smartcard_list.txt\", "
+                        "\"/usr/local/share/pcsc/smartcard_list.txt\""))
+                      (string-append "\""
+                                     #$output
+                                     "/share/pcsc/smartcard_list.txt\"")))
+                   (substitute* "ATR_analysis.1p"
+                     (("^([.]IR [.]/) ,\n$" _ cwd)
+                      (string-append cwd "\n"))
+                     (("^[.]I /usr/local/pcsc/\n$")
+                      "")
+                     (("/usr/share/pcsc/\n$")
+                      (string-append #$output "/share/pcsc/\n")))))
+               (add-after 'patch-shebangs 'wrap-programs
+                 (lambda _
+                   (for-each
+                    (lambda (prog)
+                      (wrap-program (string-append #$output
+                                                   "/bin/"
+                                                   prog)
+                        `("PERL5LIB" =
+                          (,(getenv "PERL5LIB")))))
+                    '("ATR_analysis" "gscriptor" "scriptor"))
+                   (wrap-program (string-append #$output
+                                                "/bin/gscriptor")
+                     `("GI_TYPELIB_PATH" =
+                       (,(getenv "GI_TYPELIB_PATH")))))))))
+    (native-inputs (list autoconf automake libtool gnu-gettext pkg-config))
+    (inputs (list bash-minimal ;for wrap-program
+                  perl
+                  perl-pcsc
+                  perl-gtk3
+                  pcsc-lite))
+    (synopsis "Tools for use with smart cards and PC/SC")
+    (description
+     "This package provides @code{pcsc_scan}, @code{ATR_analysis}, @code{scriptor},
+and @code{gscriptor}.")
+    (home-page "https://pcsc-tools.apdu.fr/")
+    (license license:gpl2+)))
+
 (define-public ykclient
   (package
     (name "ykclient")
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-27  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230227004235.26445-1-jakeleporte@outlook.com>
2023-02-27  0:42 ` [bug#61018] [PATCH v6 1/2] gnu: Add perl-pcsc Jake Leporte
2023-02-27  0:42 ` [bug#61018] [PATCH v6 2/2] gnu: Add pcsc-tools Jake Leporte

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.