On Mon, Jan 20, 2020 at 07:57:30PM +0100, Pierre Neidhardt wrote:
> > The solution of 2. and 3. seems to write, as Ludo mentioned:
> >
> > --8<---------------cut here---------------start------------->8---
> > (define (make-me-a-package option1 option2)
> >     (package
> >       …))
> > --8<---------------cut here---------------end--------------->8---

Just a thought, but could this be achieved using Guile's parameterization
feature?
https://www.gnu.org/software/guile/manual/html_node/Parameters.html

Not sure which method will be best overall, but its something to consider
and might avoid the need to define a bunch of extra functions. So basically
all standard parameters could be defined globally using make-parameter, then
in the parameters field of the package it lists the parameters they want
which will pick up the default values, or be overridden by parameterization.

Although I wonder if maybe it's better to not use global defaults for the
parameters and just let packages set their own defaults?

Reply via email to