guix-devel
[Top][All Lists]
Advanced

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

Re: The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.)


From: Simon Tournier
Subject: Re: The package/inherit trap (was: gnu: stellarium: Enable ShowMySky.)
Date: Tue, 07 Mar 2023 12:46:24 +0100

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:

--8<---------------cut here---------------start------------->8---
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
--8<---------------cut here---------------end--------------->8---

Well, since the trap is not completely clear for me yet, I am not able
to propose a paragraph.  IMHO, a paragraph here would help in mitigating
the trap.  Whatever the name of ’package/inherit’. :-)

1: <https://guix.gnu.org/manual/devel/en/guix.html#Defining-Package-Variants>


Cheers,
simon




reply via email to

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