Subject: [PATCH 1/3] gnu: Add go-github-com-go-piv-piv-go.

From: Nicolas Graves <[email-masked]>
Date: Sat, 8 Oct 2022 18:39:30 +0200

* gnu/packages/security-token.scm (go-github-com-go-piv-piv-go): New variable.
---
 gnu/packages/security-token.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/security-token.scm b/gnu/packages/security-token.scm
index 447a7a582d..3dc619ed4f 100644
--- a/gnu/packages/security-token.scm
+++ b/gnu/packages/security-token.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2022 John Kehayias <[email-masked]>
 ;;; Copyright © 2022 Petr Hodina <[email-masked]>
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <[email-masked]>
+;;; Copyright © 2022 Nicolas Graves <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,6 +45,7 @@ (define-module (gnu packages security-token)
   #:use-module (guix build-system cargo)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system go)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system python)
   #:use-module (gnu packages autotools)
@@ -967,3 +969,30 @@ (define-public cardpeek
 It also has limited support for Mifare Classic compatible cards (Thalys card)")
     (license license:gpl3+)
     (home-page "http://pannetrat.com/Cardpeek")))
+
+(define-public go-github-com-go-piv-piv-go
+  (package
+    (name "go-github-com-go-piv-piv-go")
+    (version "1.10.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/go-piv/piv-go")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1j2szvvwgd0ysbap42rap4f60pj4smmmrxjlx0y131l3ki6v6gdm"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/go-piv/piv-go/piv"
+       #:unpack-path "github.com/go-piv/piv-go"
+       #:tests? #f))
+    (native-inputs (list pkg-config))
+    (propagated-inputs (list pcsc-lite))
+    (home-page "https://github.com/go-piv/piv-go")
+    (synopsis "A Go YubiKey PIV implementation")
+    (description "YubiKeys implement the PIV specification for managing smart
+card certificates. This package provides a simpler alternative to GPG for
+managing asymmetric keys on a YubiKey.")
+    (license license:asl2.0)))
-- 
2.38.0