GNU bug report logs -
#76581
[PATCH 0/2] Age: Fix interaction with age.el, add manpages.
Previous Next
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
View this message in rfc822 format
Hi Nicolas,
Thanks for the patches!
--8<---------------cut here---------------start------------->8---
+ (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")
+ ""))))))
--8<---------------cut here---------------end--------------->8---
This may be simplified with #:build-flags, see examples in golang-*
> <...> "-ldflags=-X main.Version=" #$version <...>
When you update the "library" package, you may keep all fields from
[arguments] with something like this:
--8<---------------cut here---------------start------------->8---
(define-public gops
(package
(inherit go-github-com-google-gops)
(name "gops")
(arguments
(substitute-keyword-arguments
(package-arguments go-github-com-google-gops)
((#:tests? _ #t) #f)
((#:install-source? _ #t) #f)
((#:skip-build? _ #t) #f)))
(native-inputs (package-propagated-inputs go-github-com-google-gops))
(propagated-inputs '())
(inputs '())))
--8<---------------cut here---------------end--------------->8---
So the idea is to run tests and apply modifications on the "library"
side and just adjust #:import-path on final command(s)
I'm happy to review v2!
---
Oleg
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.