summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2020-09-07 14:57:57 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2020-09-12 11:18:56 +0200
commita13f45c1505fb4cf02dcbd3a80df90cc3edbb9ca (patch)
treea7449f09714f79c07d7896a3341549b53e718767 /guix/build-system
parent140da556be06442192fbae5e2a07357f26fbc26b (diff)
build-system: asdf: Switch from bundles to regular compilation.
* gnu/packages/lisp.scm (sbcl, ecl)[native-search-paths]: Add 'XDG_CONFIG_DIRS'. * guix/build-system/asdf.scm (asdf-build): Replace 'asd-file' and 'asd-system-name' keywords by 'asd-files' and 'asd-systems'. * guix/build/asdf-build-system.scm (%object-prefix, %lisp-source-install-prefix): Update variables. (install): Update variable. (main-system-name): New variable. (copy-source): Replace 'asd-file' and 'asd-system-name' keywords by 'asd-files' and 'asd-systems'. (configure): New variable. (build, check): Replace 'asd-file' and 'asd-system-name' keywords by 'asd-files' and 'asd-systems'. (create-asd-file, symlink-asd-files): Remove variables. (create-asdf-configuration): New variable. (cleanup-files): Update variable. (%standard-phases): Remove 'create-asd-file' and 'symlink-asd-files' phases. Add 'configure' and 'create-asdf-configuration' phases. * guix/build/lisp-utils.scm (%bundle-install-prefix, normalize-dependency, inputs->asd-file-map, asdf-load-all, compile-system): Remove variables. (compile-systems): New variable. (system-dependencies, compiled-system, generate-system-definition): Remove variable. (test-system): Replace 'asd-file' parameter by 'asd-files'. (generate-executable-for-system): Update variable. (generate-dependency-links, make-asd-file, bundle-asd-file): Remove variables. (make-asdf-configuration): New variable. (build-program, build-image): Set 'XDG_CONFIG_DIRS'. (generate-executable): Update variable.
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/asdf.scm38
1 files changed, 26 insertions, 12 deletions
diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 630b99e2bf..334a119948 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
-;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -54,12 +54,14 @@
;; Imported build-side modules
`((guix build asdf-build-system)
(guix build lisp-utils)
+ (guix build union)
,@%gnu-build-system-modules))
(define %asdf-build-modules
;; Used (visible) build-side modules
'((guix build asdf-build-system)
(guix build utils)
+ (guix build union)
(guix build lisp-utils)))
(define (default-lisp implementation)
@@ -210,7 +212,7 @@ set up using CL source package conventions."
(define base-arguments
(if target-is-source?
(strip-keyword-arguments
- '(#:tests? #:asd-file #:lisp #:asd-system-name #:test-asd-file)
+ '(#:tests? #:asd-files #:lisp #:asd-systems #:test-asd-file)
(package-arguments pkg))
(package-arguments pkg)))
@@ -278,8 +280,8 @@ set up using CL source package conventions."
(lambda* (store name inputs
#:key source outputs
(tests? #t)
- (asd-file #f)
- (asd-system-name #f)
+ (asd-files ''())
+ (asd-systems ''())
(test-asd-file #f)
(phases '(@ (guix build asdf-build-system)
%standard-phases))
@@ -289,12 +291,24 @@ set up using CL source package conventions."
(imported-modules %asdf-build-system-modules)
(modules %asdf-build-modules))
- (define system-name
- (or asd-system-name
- (string-drop
- ;; NAME is the value returned from `package-full-name'.
- (hyphen-separated-name->name+version name)
- (1+ (string-length lisp-type))))) ; drop the "<lisp>-" prefix.
+ ;; FIXME: The definitions of 'systems' and 'files' are pretty hacky.
+ ;; Is there a more elegant way to do it?
+ (define systems
+ (if (null? (cadr asd-systems))
+ `(quote
+ ,(list
+ (string-drop
+ ;; NAME is the value returned from `package-full-name'.
+ (hyphen-separated-name->name+version name)
+ (1+ (string-length lisp-type))))) ; drop the "<lisp>-" prefix.
+ asd-systems))
+
+ (define files
+ (if (null? (cadr asd-files))
+ `(quote ,(map (lambda (system)
+ (string-append system ".asd"))
+ (cadr systems)))
+ asd-files))
(define builder
`(begin
@@ -309,8 +323,8 @@ set up using CL source package conventions."
(derivation->output-path source))
((source) source)
(source source))
- #:asd-file ,(or asd-file (string-append system-name ".asd"))
- #:asd-system-name ,system-name
+ #:asd-files ,files
+ #:asd-systems ,systems
#:test-asd-file ,test-asd-file
#:system ,system
#:tests? ,tests?