guix: asdf: Add asdf-build-system/abcl.

* guix/build-system/asdf.scm (asdf-build-system/abcl): New variable.

Change-Id: Ifdf2a395f78f9bbb2aabe60b8cd584729666a526
This commit is contained in:
jgart 2025-06-27 11:03:13 -04:00
parent d563bf6178
commit 4f5cf07f18
No known key found for this signature in database
GPG key ID: A52AA2B477B6DD35
3 changed files with 32 additions and 2 deletions

View file

@ -44,7 +44,8 @@
asdf-build-system/source
sbcl-package->cl-source-package
sbcl-package->ecl-package
sbcl-package->clasp-package))
sbcl-package->clasp-package
sbcl-package->abcl-package))
;; Commentary:
;;
@ -70,7 +71,11 @@
(define (default-lisp implementation)
"Return the default package for the lisp IMPLEMENTATION."
;; Lazily resolve the binding to avoid a circular dependency.
(let ((lisp-module (resolve-interface '(gnu packages lisp))))
(let ((lisp-module
(resolve-interface
(if (eq? implementation 'abcl)
'(gnu packages java)
'(gnu packages lisp)))))
(module-ref lisp-module implementation)))
(define* (lower/source name
@ -254,6 +259,7 @@ set up using CL source package conventions."
("sbcl" 'sbcl)
("ecl" 'ecl)
("clasp" 'clasp-cl)
("abcl" 'abcl)
(_ error "The LISP provided is not supported at this time."))))
#:allow-other-keys
#:rest arguments)
@ -353,6 +359,12 @@ set up using CL source package conventions."
(description "The build system for ASDF binary packages using Clasp")
(lower (lower "clasp"))))
(define asdf-build-system/abcl
(build-system
(name 'asdf/abcl)
(description "The build system for ASDF binary packages using ABCL")
(lower (lower "abcl"))))
(define asdf-build-system/source
(build-system
(name 'asdf/source)
@ -401,4 +413,18 @@ set up using CL source package conventions."
(transformer
(strip-variant-as-necessary property pkg)))))
(define sbcl-package->abcl-package
(let* ((property 'abcl-variant)
(transformer
(package-with-build-system asdf-build-system/sbcl
asdf-build-system/abcl
"sbcl-"
"abcl-"
#:variant-property property
#:phases-transformer
'identity)))
(lambda (pkg)
(transformer
(strip-variant-as-necessary property pkg)))))
;;; asdf.scm ends here

View file

@ -2,6 +2,7 @@
;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2020, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2025 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
;;;

View file

@ -2,6 +2,7 @@
;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2020, 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2022 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2025 jgart <jgart@dismail.de>
;;;
;;; This file is part of GNU Guix.
;;;
@ -108,6 +109,8 @@ with PROGRAM."
"--eval" "(quit)"))
("clasp" `(,(%lisp) "--non-interactive"
,@(spread-statements program "--eval")))
("abcl" `(,(%lisp) "--batch"
,@(spread-statements program "--eval")))
(_ (error "The LISP provided is not supported at this time."))))
(define (compile-systems systems directory operation)