GNU bug report logs - #54560
[PATCH 00/47] gnu: Add go-github-com-prometheus-prometheus.

Previous Next

Package: guix-patches;

Reported by: Leo Nikkilä <hello <at> lnikki.la>

Date: Fri, 25 Mar 2022 08:11:02 UTC

Severity: normal

Tags: patch

Full log


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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Leo Nikkilä <hello <at> lnikki.la>, 54560 <at> debbugs.gnu.org
Subject: Re: [bug#54560] [PATCH 01/47] gnu: Add go-google-golang-org-protobuf.
Date: Sat, 26 Mar 2022 10:31:16 +0100
[Message part 1 (text/plain, inline)]
Leo Nikkilä schreef op vr 25-03-2022 om 22:55 [+0000]:
> However, due to how go-build-system correlates these import paths with directory paths, supporting wildcards in `#:import-path` directly would require further changes to the build system.

Looking at go-build-system.scm, it seems that 'unpack, 'install'
and 'install-licenses' need to be modified to drop the "/..." suffix,
if any?  If this is done in go-build-system, then more packages could
benefit and perhaps some existing package definitions could be
simplified.

;; See <https://pkg.go.dev/cmd/go#hdr-Package_lists_and_patterns>
;; for how wildcard paths work.
(define (unwildcard-import-path import-path
  (if (string-suffix? "/..." import-path)
      (string-drop-right import-path 4)
      import-path))

;; in 'unpack', change  
;; (when (string-null? unpack-path)
;;    (set! unpack-path import-path))
;; to
;; (when (string-null? unpack-path)
;;    (set! unpack-path (unwildcard-import-path unpack-path)))
;;
;; and likewise in 'install' and and 'install-license-files'.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 293 days ago.

Previous Next


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