unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Nicolas Graves via "Development of GNU Guix and the GNU System
	distribution." <guix-devel@gnu.org>
Cc: Nicolas Graves <ngraves@ngraves.fr>
Subject: Re: build-system-modules
Date: Tue, 03 Jan 2023 10:13:01 +0100	[thread overview]
Message-ID: <87zgb07zhe.fsf@gnu.org> (raw)
In-Reply-To: <873590oke9.fsf@ngraves.fr> (Nicolas Graves via's message of "Tue, 27 Dec 2022 17:56:30 +0100")

Hi,

Nicolas Graves via "Development of GNU Guix and the GNU System
distribution." <guix-devel@gnu.org> 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’.


      parent reply	other threads:[~2023-01-03  9:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 16:56 build-system-modules Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2022-12-28 10:00 ` build-system-modules Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2023-01-03  9:13 ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgb07zhe.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ngraves@ngraves.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).