unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* build-system-modules
@ 2022-12-27 16:56 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 ` build-system-modules Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Nicolas Graves via Development of GNU Guix and the GNU System distribution. @ 2022-12-27 16:56 UTC (permalink / raw)
  To: guix-devel


Is there a good reason to have put %gnu-build-system-modules after other
modules when defining %X-build-system-modules ?

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)))

To reproduce:

Take a guile or maven package, fill the #:modules key in arguments with
respectively '(%guile-build-system-modules) or
'(%maven-build-system-modules), the packaging phases should fail with
gnu-build-system packaging phases.

-- 
Best regards,
Nicolas Graves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: build-system-modules
  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 ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
  2023-01-03  9:13 ` build-system-modules Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Graves via Development of GNU Guix and the GNU System distribution. @ 2022-12-28 10:00 UTC (permalink / raw)
  To: guix-devel


Just a small fix for my last paragraph:

On 2022-12-27 17:56, Nicolas Graves wrote:

> Take a guile or maven package, fill the #:modules key in arguments with
> respectively '(%guile-build-system-modules) or
> '(%maven-build-system-modules), the packaging phases should fail with
> gnu-build-system packaging phases.

Take a guile or maven package, fill the #:modules key in arguments with
respectively `(,%guile-build-system-modules) or
`(,%maven-build-system-modules), the packaging phases should fail with
gnu-build-system packaging phases.

-- 
Best regards,
Nicolas Graves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: build-system-modules
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2023-01-03  9:13 UTC (permalink / raw)
  To: Nicolas Graves via Development of GNU Guix and the GNU System distribution.
  Cc: Nicolas Graves

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’.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-03  9:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` build-system-modules Ludovic Courtès

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).