Subject: [bug#58340] [PATCH 2/2] gnu: Add age and its modules.

From: Nicolas Graves <[email-masked]>
Date: Thu, 6 Oct 2022 19:09:08 +0200

* gnu/packages/golang.scm
  (age): New variable.
  (go-filippo-io-cmd-age): New variable.
  (go-filippo-io-cmd-age-keygen): New variable.
---
 gnu/packages/golang.scm | 50 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index e8132eb138..7559e3ef9d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -35,6 +35,7 @@
 ;;; Copyright © 2021 Lu Hui <[email-masked]>
 ;;; Copyright © 2022 Pier-Hugues Pellerin <[email-masked]>
 ;;; Copyright © 2022 muradm <[email-masked]>
+;;; Copyright © 2022 Nicolas Graves <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -949,6 +950,55 @@ (define-public go-filippo-io-edwards25519
 the necessary APIs to build a wide array of higher-level primitives.")
     (license license:bsd-3)))
 
+(define-public age
+  (package
+    (name "age")
+    (version "1.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/FiloSottile/age")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "19fz68n262kvg2ssw4r6nik30zk6g6cy7rdi0fm05czwigqrdz1i"))))
+    (build-system go-build-system)
+    (arguments `(#:import-path "filippo.io/age"))
+    (propagated-inputs
+     (list go-filippo-io-cmd-age
+           go-filippo-io-cmd-age-keygen))
+    (home-page "https://filippo.io/age")
+    (synopsis "Secure file encryption tool, format, and Go library")
+    (description
+     "This package implements file encryption according to the
+@code{age-encryption.org/v1} specification. It features small explicit keys,
+no config options, and UNIX-style composability.")
+    (license license:bsd-3)))
+
+(define-public go-filippo-io-cmd-age
+  (package
+    (inherit age)
+    (name "go-filippo-io-cmd-age")
+    (propagated-inputs
+     (list go-golang-org-x-sys
+           go-golang-org-x-term
+           go-golang-org-x-crypto
+           go-filippo-io-edwards25519))
+    (arguments
+     `(#:import-path "filippo.io/age/cmd/age"
+       #:unpack-path "filippo.io/age"
+       #:install-source? #f))))
+
+(define-public go-filippo-io-cmd-age-keygen
+  (package
+    (inherit go-filippo-io-cmd-age)
+    (name "go-filippo-io-cmd-age-keygen")
+    (arguments
+     `(#:import-path "filippo.io/age/cmd/age-keygen"
+       #:unpack-path "filippo.io/age"
+       #:install-source? #f))))
+
 (define-public go-0xacab-org-leap-shapeshifter
   (let ((commit "0aa6226582efb8e563540ec1d3c5cfcd19200474")
         (revision "12"))
-- 
2.37.3