guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The package/inherit trap


From: Maxim Cournoyer
Subject: Re: The package/inherit trap
Date: Tue, 07 Mar 2023 11:43:10 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Simon,

Simon Tournier <zimon.toutoune@gmail.com> writes:

> Hi,
>
> On Fri, 03 Mar 2023 at 20:21, Tobias Geerinckx-Rice <me@tobias.gr> wrote:
>
>> Could we rename it to something like 
>> ‘package+replacements/inherit’?  To me, that captures the spirit, 
>> without being overly longer.
>
> Well, I gave a look at the code and have seen the replacement.  But I
> had not thought about the package transformation and the like.
>
> From my point of view, the best would to add a paragraph with index
> entries under “Defining-Package-Variants” section [1].
>
> However, in the light of Maxim’s explanations, the example from the
> manual appears to me inconsistent:
>
> You can just as well define variants with a different set of
> dependencies than the original package.  For example, the default
> @code{gdb} package depends on @code{guile}, but since that is an
> optional dependency, you can define a variant that removes that
> dependency like so:
>
> @lisp
> (use-modules (gnu packages gdb))   ;for 'gdb'
>
> (define gdb-sans-guile
>   (package
>     (inherit gdb)
>     (inputs (modify-inputs (package-inputs gdb)
>               (delete "guile")))))
> @end lisp

Do you mean inconsistent because based on what I wrote it should have
used "package/inherit gdb ..." instead of (package (inherit gdb) ...) ?
If so, I agree.  It could be modified to use the former and an extra
explanation offered about why package/inherit is used here when it's to
be preferred to plain inheritance.

-- 
Thanks,
Maxim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]