[PATCH] guix: gnu-build-system: Add %gnu-build-system-default-modules.

  • Done
  • quality assurance status badge
Details
3 participants
  • Maxim Cournoyer
  • Bruno Victal
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal

Debbugs page

Tomas Volf wrote 9 months ago
(address . guix-patches@gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
ebe4129898ffdef998af427e62a5b43da4499f28.1718651435.git.~@wolfsden.cz
Since there is no exported variable containing the list of default modules,
every place that needs it (in #:modules for example) needs to copy&paste it
and pray it never changes.

This commit provides new variable exposing the default list, allowing
constructs like this:

#:modules
`((srfi srfi-34)
,@%gnu-build-system-default-modules)

* guix/build-system/gnu.scm (%gnu-build-system-default-modules): New variable.
(define-module)[#:export]: Export it.

Change-Id: I1da392019a95aea5edeac0301db26266efbeee9e
---
guix/build-system/gnu.scm | 3 +++
1 file changed, 3 insertions(+)

Toggle diff (23 lines)
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index cdbb547773..53ac2f8cbd 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -28,6 +28,7 @@ (define-module (guix build-system gnu)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
#:export (%gnu-build-system-modules
+ %gnu-build-system-default-modules
%strip-flags
%strip-directories
gnu-build
@@ -60,6 +61,8 @@ (define %default-modules
'((guix build gnu-build-system)
(guix build utils)))
+(define %gnu-build-system-default-modules %default-modules)
+
(define* (package-with-explicit-inputs/deprecated p inputs
#:optional
(loc (current-source-location))
--
2.45.1
Bruno Victal wrote 9 months ago
(name . Tomas Volf)(address . ~@wolfsden.cz)
576f3021-8b00-430e-a527-b791c03e1c38@makinata.eu
Hi Tomas,

On 2024-06-17 20:10, Tomas Volf wrote:
Toggle quote (4 lines)
> Since there is no exported variable containing the list of default modules,
> every place that needs it (in #:modules for example) needs to copy&paste it
> and pray it never changes.

I believe this has been addressed with [1].


--
Cheers,
Bruno.
Maxim Cournoyer wrote 9 months ago
(name . Bruno Victal)(address . mirai@makinata.eu)
87v825d9pp.fsf@gmail.com
Hi,

Bruno Victal <mirai@makinata.eu> writes:

Toggle quote (11 lines)
> Hi Tomas,
>
> On 2024-06-17 20:10, Tomas Volf wrote:
>> Since there is no exported variable containing the list of default modules,
>> every place that needs it (in #:modules for example) needs to copy&paste it
>> and pray it never changes.
>
> I believe this has been addressed with [1].
>
> [1]: <https://issues.guix.gnu.org/66426>

Indeed, thanks for the heads-up. That's on the core-updates branch.

Closing.

--
Thanks,
Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 71618@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71618
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help