From 457702b1d9bea593d51e5187b2f104d553fafce4 Mon Sep 17 00:00:00 2001 From: Andy Patterson Date: Sat, 8 Apr 2017 23:48:38 -0400 Subject: 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. --- guix/build-system/asdf.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'guix/build-system') 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 "-" 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 -- cgit v1.2.3