From 8897360fb367908c6972559b075f7c10810ae69b Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Tue, 8 Jul 2025 11:01:21 +0200 Subject: [PATCH] build-system: guile: Make #:documentation-file-regexp configurable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/build/guile-build-system.scm (install-documentation): Unset documentation-file-regexp keyword default. (%documentation-file-regexp): Move variable to... * guix/build-system/guile.scm (%documentation-file-regexp): New variable. (guile-build, guile-cross-build): Use it. Signed-off-by: Ludovic Courtès --- guix/build-system/guile.scm | 8 ++++++++ guix/build/guile-build-system.scm | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/guix/build-system/guile.scm b/guix/build-system/guile.scm index df6988a1b7e339d28021fab951ad3c0f47e11370..e2ba720e9ca54af88957db59cb771111e6e59def 100644 --- a/guix/build-system/guile.scm +++ b/guix/build-system/guile.scm @@ -33,6 +33,10 @@ ;; Regexp to match Scheme files. "\\.(scm|sls)$") +(define %documentation-file-regexp + ;; Regexp to match README files and the likes. + "^(README.*|.*\\.html|.*\\.org|.*\\.md)$") + (define %guile-build-system-modules ;; Build-side modules imported by default. `((guix build guile-build-system) @@ -85,6 +89,7 @@ (source-directory ".") not-compiled-file-regexp (scheme-file-regexp %scheme-file-regexp) + (documentation-file-regexp %documentation-file-regexp) ;; FIXME: Turn on parallel building of Guile modules by ;; default after the non-determinism issues in the Guile byte ;; compiler are resolved (see bug #20272). @@ -104,6 +109,7 @@ #:source #+source #:source-directory #$source-directory #:scheme-file-regexp #$scheme-file-regexp + #:documentation-file-regexp #$documentation-file-regexp #:not-compiled-file-regexp #$not-compiled-file-regexp #:parallel-build? #$parallel-build? #:compile-flags #$compile-flags @@ -136,6 +142,7 @@ (phases '%standard-phases) (source-directory ".") (scheme-file-regexp %scheme-file-regexp) + (documentation-file-regexp %documentation-file-regexp) not-compiled-file-regexp ;; FIXME: Turn on parallel building of Guile ;; modules by default after the non-determinism @@ -169,6 +176,7 @@ #:source-directory #$source-directory #:scheme-file-regexp #$scheme-file-regexp #:not-compiled-file-regexp #$not-compiled-file-regexp + #:documentation-file-regexp #$documentation-file-regexp #:parallel-build? #$parallel-build? #:compile-flags #$compile-flags #:inputs %build-target-inputs diff --git a/guix/build/guile-build-system.scm b/guix/build/guile-build-system.scm index d2198b671517d4d1371c61451dc61f3b8bc11fa6..8934278a9790bdd3dd9ec2a79352f38886072673 100644 --- a/guix/build/guile-build-system.scm +++ b/guix/build/guile-build-system.scm @@ -66,10 +66,6 @@ determined." ;; Regexp to match Scheme files. "\\.(scm|sls)$") -(define %documentation-file-regexp - ;; Regexp to match README files and the likes. - "^(README.*|.*\\.html|.*\\.org|.*\\.md)$") - (define* (set-locale-path #:key inputs native-inputs #:allow-other-keys) "Set 'GUIX_LOCPATH'." @@ -212,9 +208,7 @@ installed; this is useful for files that are meant to be included." #:max-processes (if parallel-build? (parallel-job-count) 1) #:report-progress report-build-progress)))) -(define* (install-documentation #:key outputs - (documentation-file-regexp - %documentation-file-regexp) +(define* (install-documentation #:key outputs documentation-file-regexp #:allow-other-keys) "Install files that match DOCUMENTATION-FILE-REGEXP." (let* ((out (assoc-ref outputs "out"))