Hi Simon, Simon Tournier <zimon.touto...@gmail.com> writes:
> Hi, > > On Fri, 03 Mar 2023 at 20:21, Tobias Geerinckx-Rice <m...@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