summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorAndy Patterson <ajpatter@uwaterloo.ca>2017-04-08 23:48:38 -0400
committerRicardo Wurmus <rekado@elephly.net>2017-05-16 15:18:15 +0200
commit457702b1d9bea593d51e5187b2f104d553fafce4 (patch)
treeec90d139078925e16d625078b6f552181bbe6024 /guix/build-system
parentb4c9f0c50de39da253dadfde9e85de06d665cd1e (diff)
build-system/asdf: Pass the system name as an argument to the builder.
* guix/build-system/asdf.scm (asdf-build): Use the user-defined system name, or calculate it from the package's full name. [builder]: Pass the value along to the build procedure. (package-with-build-system): Remove #:asd-system-name from source packages' arguments. * guix/build/asdf-build-system.scm: Adjust accordingly. * guix/build/lisp-utils.scm (remove-lisp-from-name): Delete variable.
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/asdf.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 4afc6ef1a7..553bbe4825 100644
--- a/guix/build-system/asdf.scm
+++ b/guix/build-system/asdf.scm
@@ -22,6 +22,9 @@
#:use-module (guix packages)
#:use-module (guix derivations)
#:use-module (guix search-paths)
+ #:use-module ((guix build utils)
+ #:select ((package-name->name+version
+ . hyphen-separated-name->name+version)))
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (ice-9 match)
@@ -196,7 +199,7 @@ set up using CL source package conventions."
(define base-arguments
(if target-is-source?
(strip-keyword-arguments
- '(#:tests? #:asd-file #:lisp)
+ '(#:tests? #:asd-file #:lisp #:asd-system-name)
(package-arguments pkg))
(package-arguments pkg)))
@@ -262,6 +265,7 @@ set up using CL source package conventions."
#:key source outputs
(tests? #t)
(asd-file #f)
+ (asd-system-name #f)
(phases '(@ (guix build asdf-build-system)
%standard-phases))
(search-paths '())
@@ -270,6 +274,13 @@ 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.
+
(define builder
`(begin
(use-modules ,@modules)
@@ -284,6 +295,7 @@ set up using CL source package conventions."
((source) source)
(source source))
#:asd-file ,asd-file
+ #:asd-system-name ,system-name
#:system ,system
#:tests? ,tests?
#:phases ,phases