summaryrefslogtreecommitdiff
path: root/guix/build-system/gnu.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-10-09 11:10:48 -0400
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:42:16 +0200
commitf59df1aa3c104aabff3291f6b8b155fb01aebc06 (patch)
tree65118f36da29df88bd6dece2e6b9f4d54089b6e2 /guix/build-system/gnu.scm
parent0e881505f19bd9ea9eb543c43483f2ac45a912b3 (diff)
build-systems: gnu: Export %default-gnu-imported-modules and %default-gnu-modules.
Until now users would have to cargo cult or inspect the private %default-modules variable of (guix build-systems gnu) to discover which modules to include when extending the used modules via the #:modules argument. The renaming was automated via the command: $ git grep -l %gnu-build-system-modules | xargs sed 's/%gnu-build-system-modules/%default-gnu-imported-modules/' -i * guix/build-system/gnu.scm (%gnu-build-system-modules): Rename to... (%default-gnu-imported-modules): ... this. (%default-modules): Rename to... (%default-gnu-modules): ... this. Export. (dist-package, gnu-build, gnu-cross-build): Adjust accordingly. Change-Id: Idef307fff13cb76f3182d782b26e1cd3a5c757ee
Diffstat (limited to 'guix/build-system/gnu.scm')
-rw-r--r--guix/build-system/gnu.scm19
1 files changed, 10 insertions, 9 deletions
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index cdbb547773..1bd133152a 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -27,7 +27,8 @@
#:use-module (guix packages)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
- #:export (%gnu-build-system-modules
+ #:export (%default-gnu-imported-modules
+ %default-gnu-modules
%strip-flags
%strip-directories
gnu-build
@@ -48,14 +49,14 @@
;;
;; Code:
-(define %gnu-build-system-modules
+(define %default-gnu-imported-modules
;; Build-side modules imported and used by default.
'((guix build gnu-build-system)
(guix build utils)
(guix build gremlin)
(guix elf)))
-(define %default-modules
+(define %default-gnu-modules
;; Modules in scope in the build-side environment.
'((guix build gnu-build-system)
(guix build utils)))
@@ -237,10 +238,10 @@ exact build phases are defined by PHASES."
(arguments
;; Use the right phases and modules.
(substitute-keyword-arguments (package-arguments p)
- ((#:modules modules %default-modules)
+ ((#:modules modules %default-gnu-modules)
`((guix build gnu-dist)
,@modules))
- ((#:imported-modules modules %gnu-build-system-modules)
+ ((#:imported-modules modules %default-gnu-imported-modules)
`((guix build gnu-dist)
,@modules))
((#:phases _ #f)
@@ -359,8 +360,8 @@ standard packages used as implicit inputs of the GNU build system."
(locale "en_US.utf8")
(system (%current-system))
(build (nix-system->gnu-triplet system))
- (imported-modules %gnu-build-system-modules)
- (modules %default-modules)
+ (imported-modules %default-gnu-imported-modules)
+ (modules %default-gnu-modules)
(substitutable? #t)
allowed-references
disallowed-references)
@@ -502,8 +503,8 @@ is one of `host' or `target'."
(locale "en_US.utf8")
(system (%current-system))
(build (nix-system->gnu-triplet system))
- (imported-modules %gnu-build-system-modules)
- (modules %default-modules)
+ (imported-modules %default-gnu-imported-modules)
+ (modules %default-gnu-modules)
(substitutable? #t)
allowed-references
disallowed-references)