From 2fa8fd4af59af0de392352915fa50fc21a4cf98a Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Thu, 6 May 2021 10:32:56 +0200 Subject: 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 . * guix/build-system/asdf.scm (asdf-build): Fix 'systems' function. * guix/build/asdf-build-system.scm (main-system-name): Fix it. --- guix/build-system/asdf.scm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'guix/build-system') 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 -;;; Copyright © 2019, 2020 Guillaume Le Vaillant +;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant ;;; ;;; 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 "-" 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 -- cgit v1.2.3