From 15c7a20030a7e7643af7948982791074e4c358be Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Fri, 4 Dec 2020 10:48:41 +0100 Subject: [PATCH 3/4] gnu: clisp: Use system ASDF instead of bundled one. * gnu/packages/lisp.scm (clisp)[native-inputs]: Add cl-asdf. [arguments]: Add 'replace-asdf' phase. [native-search-paths]: Add XDG_CONFIG_DIRS and XDG_DATA_DIRS. --- gnu/packages/lisp.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 2a8c59546e..07d54747cb 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -322,6 +322,8 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.") (sha256 (base32 "0k2dmgl0miz3767iks4p0mvp6xw0ysyxhjpklyh11j010rmh6hqb")))) (build-system gnu-build-system) + (native-inputs + `(("cl-asdf" ,cl-asdf))) (inputs `(("libffcall" ,libffcall) ("ncurses" ,ncurses) ("readline" ,readline) @@ -356,7 +358,25 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.") (("/bin/sh") "sh")) (substitute* '("src/clisp-link.in") (("/bin/pwd") "pwd")) - #t))))) + #t)) + (add-after 'unpack 'replace-asdf + ;; Use system ASDF instead of bundled one. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((cl-asdf (assoc-ref inputs "cl-asdf")) + (guix-asdf (string-append + cl-asdf + "/share/common-lisp/source/asdf/asdf.lisp")) + (out (string-append (assoc-ref outputs "out"))) + (contrib-asdf "modules/asdf/asdf.lisp")) + (delete-file contrib-asdf) + (copy-file guix-asdf contrib-asdf))))))) + (native-search-paths + (list (search-path-specification + (variable "XDG_DATA_DIRS") + (files '("share"))) + (search-path-specification + (variable "XDG_CONFIG_DIRS") + (files '("etc"))))) (home-page "https://clisp.sourceforge.io/") (synopsis "A Common Lisp implementation") (description -- 2.29.2