diff options
author | Pierre Neidhardt <mail@ambrevar.xyz> | 2022-07-01 17:17:32 +0200 |
---|---|---|
committer | Guillaume Le Vaillant <glv@posteo.net> | 2022-08-03 16:45:53 +0200 |
commit | 6181f1f26310146ae509af2074c55f87e8f21a96 (patch) | |
tree | ffbd541615acc24b8bf7cec44975a713fab32adf /guix/build-system | |
parent | 6b5ef03a2582ab23228478018fd356e17db1daea (diff) |
build-system: asdf: Let ASDF locate the .asd files.
This approach has many benefits:
- It simplifies the build system.
- The package definitions are easier to write.
- It fixes a bug with systems that call asdf:clear-system which would cause
the load to fail. See for instance test systems using Prove.
* guix/build-system/asdf.scm (package-with-build-system): Remove 'asd-files'
and replace 'test-asd-file' by 'asd-test-systems'.
(lower): Same.
* guix/build/asdf-build-system.scm (source-asd-file): Remove since ASDF does
it better than us.
(find-asd-files): Same.
(build): Remove unused asd-files argument.
(check): Remove asd-files argument and replace asd-systems by
asd-test-systems.
* guix/build/lisp-utils.scm (compile-systems): Call to ASDF to find the
systems.
(test-system): Same.
Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
Diffstat (limited to 'guix/build-system')
-rw-r--r-- | guix/build-system/asdf.scm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index a0f4634db0..46b0742f6e 100644 --- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca> ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2022 Pierre Neidhardt <mail@ambrevar.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -202,7 +203,7 @@ set up using CL source package conventions." (define base-arguments (if target-is-source? (strip-keyword-arguments - '(#:tests? #:asd-files #:lisp #:asd-systems #:test-asd-file) + '(#:tests? #:lisp #:asd-systems #:asd-test-systems) (package-arguments pkg)) (package-arguments pkg))) @@ -270,9 +271,8 @@ set up using CL source package conventions." (lambda* (name inputs #:key source outputs (tests? #t) - (asd-files ''()) (asd-systems ''()) - (test-asd-file #f) + (asd-test-systems ''()) (phases '%standard-phases) (search-paths '()) (system (%current-system)) @@ -292,6 +292,11 @@ set up using CL source package conventions." `(quote ,(list package-name))) asd-systems)) + (define test-systems + (if (null? (cadr asd-test-systems)) + systems + asd-test-systems)) + (define builder (with-imported-modules imported-modules #~(begin @@ -302,9 +307,8 @@ set up using CL source package conventions." (%lisp-type #$lisp-type)) (asdf-build #:name #$name #:source #+source - #:asd-files #$asd-files #:asd-systems #$systems - #:test-asd-file #$test-asd-file + #:asd-test-systems #$test-systems #:system #$system #:tests? #$tests? #:phases #$phases |