GNU bug report logs -
#68835
Resolving package inheritance issue
Previous Next
Full log
View this message in rfc822 format
Hi,
On Wed, 31 Jan 2024 at 01:01, Sharlatan Hellseher <sharlatanus <at> gmail.com> wrote:
> My rational was to keep golang module in (gnu packages golang-web) and
> the new inherited package providing executable in (gnu packages web)
> which introduced the regression.
As said by Josselin, the manual provides some explanations for this kind
of situations.
https://guix.gnu.org/manual/devel/en/guix.html#Cyclic-Module-Dependencies
Roughly speaking, your proposal for Go language packages breaks because
more or less « Because the ‘inherit’ field is not delayed (thunked), it
is evaluated at the top level at load time, which is problematic in the
presence of module dependency cycles. »
The “fix” would to wrap it using a procedure; as explained in the
manual. Something like:
(define (make-minify)
(package
(inherit go-github-com-tdewolff-minify-v2)
(name "minify")
(arguments
(substitute-keyword-arguments
(package-arguments go-github-com-tdewolff-minify-v2)
((#:install-source? _ #t) #f)
((#:import-path _ "github.com/tdewolff/minify/v2")
"github.com/tdewolff/minify/cmd/minify"))))
Well, then it is not clear for me how the user would access to this
package but somehow that’s another story. :-)x
As Josselin, I would suggest to keep in the same Guile module the
original package and its variants created using ’inherit’; well as the
general rule.
Cheers,
simon
This bug report was last modified 1 year and 101 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.