summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-09-15 14:36:24 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2020-09-15 14:36:24 +0200
commit952fafb2a3c7a0978cc6a96268ad0632558b212d (patch)
tree1a4374035f6c56d0b2c685441740b885fdcd6bf7 /guix/build
parente7cbcf5aff81149ac8ffab2d38bdcc1e8df97bf1 (diff)
build-system: asdf: Read all .asd files if no #:asd-files specified.
* guix/build-system/asdf.scm (asdf-build): Remove the 'files' variable. * guix/build/asd-build-system.scm (find-asd-files): New variable. (build, check): Use it.
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/asdf-build-system.scm15
1 files changed, 9 insertions, 6 deletions
diff --git a/guix/build/asdf-build-system.scm b/guix/build/asdf-build-system.scm
index b7957e7fc5..26d295e083 100644
--- a/guix/build/asdf-build-system.scm
+++ b/guix/build/asdf-build-system.scm
@@ -81,6 +81,13 @@ to it's binary output."
(define (source-asd-file output name asd-file)
(string-append (lisp-source-directory output name) "/" asd-file))
+(define (find-asd-files output name asd-files)
+ (if (null? asd-files)
+ (find-files (lisp-source-directory output name) "\\.asd$")
+ (map (lambda (asd-file)
+ (source-asd-file output name asd-file))
+ asd-files)))
+
(define (copy-files-to-output out name)
"Copy all files from the current directory to OUT. Create an extra link to
any system-defining files in the source to a convenient location. This is
@@ -189,9 +196,7 @@ if it's present in the native-inputs."
(translations (wrap-output-translations
`(,(output-translation source-path
out))))
- (asd-files (map (lambda (asd-file)
- (source-asd-file out system-name asd-file))
- asd-files)))
+ (asd-files (find-asd-files out system-name asd-files)))
(setenv "ASDF_OUTPUT_TRANSLATIONS"
(replace-escaped-macros (format #f "~S" translations)))
(setenv "HOME" out) ; ecl's asdf sometimes wants to create $HOME/.cache
@@ -204,9 +209,7 @@ if it's present in the native-inputs."
"Test the system."
(let* ((out (library-output outputs))
(system-name (main-system-name out))
- (asd-files (map (lambda (asd-file)
- (source-asd-file out system-name asd-file))
- asd-files))
+ (asd-files (find-asd-files out system-name asd-files))
(test-asd-file
(and=> test-asd-file
(cut source-asd-file out system-name <>))))