Hi,

Nicolas Graves via "Development of GNU Guix and the GNU System
distribution." <[email protected]> skribis:

> I met a packaging error two times when hacking guile or maven packages,
> where after using the #:modules flag in arguments, I found myself with
> gnu build-system packaging phases instead of guile or maven build-system
> modules. When inverting the modules order, I don't have this error
> anymore. I would like to invert them, except if there's a reason against
> it.
>
> Codelines I'm referring to :
>
>  (define %guile-build-system-modules
>    ;; Build-side modules imported by default.
> -  `((guix build guile-build-system)
> -    ,@%gnu-build-system-modules))
> +  `(,@%gnu-build-system-modules
> +    (guix build guile-build-system)))
>
>
>  (define %maven-build-system-modules
>    ;; Build-side modules imported by default.
> -  `((guix build maven-build-system)
> -    (guix build maven pom)
> -    ,@%gnu-build-system-modules))
> +  `(,@%gnu-build-system-modules
> +    (guix build maven-build-system)
> +    (guix build maven pom)))

Maybe you’re confusing #:imported-modules and #:modules?

The former says which modules are made available in the build
environment, so the order doesn’t matter; ‘%guile-build-system-modules’
is the default value of #:imported-modules.

Conversely, #:modules says which modules are in scope; it’s usually a
subset of #:imported-modules.  In that case, you can also pass #:hide,
#:select, etc. as in:

  #:modules (((guix build gnu-build-system) #:hide (%standard-phases))
             (guix build mavent-build-system))

Does that make sense?

Thanks,
Ludo’.

  • build-system-modu... Development of GNU Guix and the GNU System distribution.
    • Re: build-sy... Development of GNU Guix and the GNU System distribution.
    • Re: build-sy... Ludovic Courtès

Reply via email to