summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2021-05-06 10:32:56 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2021-05-08 13:42:38 +0200
commit2fa8fd4af59af0de392352915fa50fc21a4cf98a (patch)
treed7a09755f0568d759dcd849e057bf2886f127c0c /guix/build-system
parente5adaf6c2de917f33f90e24b551a8991e55b3eb6 (diff)
build-system: asdf: Work around package-name->name+version bug.
This patch modifies how the name of the main Common Lisp system is extracted from the full Guix package name to work around bug#48225 concerning the 'package-name->name+version' function. Fixes <https://issues.guix.gnu.org/41437>. * guix/build-system/asdf.scm (asdf-build): Fix 'systems' function. * guix/build/asdf-build-system.scm (main-system-name): Fix it.
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/asdf.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm
index 28403a1960..b4e40ee8c2 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, 2020 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -291,16 +291,16 @@ set up using CL source package conventions."
(imported-modules %asdf-build-system-modules)
(modules %asdf-build-modules))
- ;; FIXME: The definition of 'systems' is 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.
+ ;; FIXME: Find a more reliable way to get the main system name.
+ (let* ((lisp-prefix (string-append lisp-type "-"))
+ (package-name (hyphen-separated-name->name+version
+ (if (string-prefix? lisp-prefix name)
+ (string-drop name
+ (string-length lisp-prefix))
+ name))))
+ `(quote ,(list package-name)))
asd-systems))
(define builder