GNU bug report logs - #76581
[PATCH 0/2] Age: Fix interaction with age.el, add manpages.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Wed, 26 Feb 2025 09:58:02 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 76581 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 76581 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: age, age-keygen: Fix --version.
Date: Wed, 26 Feb 2025 10:35:32 +0100
* gnu/packages/golang-crypto.scm (go-filippo-io-age)[source]: Add
snippet to hardcode the version.
---
 gnu/packages/golang-crypto.scm | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang-crypto.scm b/gnu/packages/golang-crypto.scm
index b1a114dd80..3ff3c39698 100644
--- a/gnu/packages/golang-crypto.scm
+++ b/gnu/packages/golang-crypto.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2021 Vagrant Cascadian <vagrant <at> debian.org>
 ;;; Copyright © 2022 (unmatched-parenthesis <paren <at> disroot.org>
 ;;; Copyright © 2022 Tobias Geerinckx-Rice <me <at> tobias.gr>
-;;; Copyright © 2022, 2023 Nicolas Graves <ngraves <at> ngraves.fr>
+;;; Copyright © 2022, 2023, 2025 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;; Copyright © 2023 Benjamin <benjamin <at> uvy.fr>
 ;;; Copyright © 2023 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2023 Felix Lechner <felix.lechner <at> lease-up.com>
@@ -135,7 +135,22 @@ (define-public go-filippo-io-age
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "183iqzmdwk4b35vxrdg2gdzd4277yr5bgbgl9brqv3w1dap5v4pm"))))
+        (base32 "183iqzmdwk4b35vxrdg2gdzd4277yr5bgbgl9brqv3w1dap5v4pm"))
+       (modules '((guix build utils)))
+       (snippet
+        #~(begin
+            (substitute* '("cmd/age/age.go"
+                           "cmd/age-keygen/keygen.go")
+              (("var Version string")
+               (format #f "var Version = ~s" #$version))
+              ;; We can as well not require runtime/debug now,
+              ;; since it's only used to get the version.
+              (("\"runtime/debug\"")
+               "")
+              (("buildInfo, ok := debug\\.ReadBuildInfo\\(\\); ok")
+               "false")
+              (("buildInfo\\.Main\\.Version")
+               ""))))))
     (build-system go-build-system)
     (arguments
      (list
-- 
2.48.1



-- 
Best regards,
Nicolas Graves




This bug report was last modified 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.