diff options
author | Andy Patterson <ajpatter@uwaterloo.ca> | 2016-10-02 22:41:28 -0400 |
---|---|---|
committer | 宋文武 <iyzsong@gmail.com> | 2016-10-06 20:33:55 +0800 |
commit | 8d0489aeb6800f9e430262a42a17cc0ff3ed434f (patch) | |
tree | f6854d1ab283362af5a77e284a749333510337d6 /gnu/packages/lisp.scm | |
parent | eb0ff8a38257d61aee1c2e9430db98f6f8ee7b2c (diff) | |
download | gnu-guix-8d0489aeb6800f9e430262a42a17cc0ff3ed434f.tar gnu-guix-8d0489aeb6800f9e430262a42a17cc0ff3ed434f.tar.gz |
gnu: sbcl: Honour XDG_DATA_DIRS/sbcl-bundle-systems.
* gnu/packages/lisp.scm (asdf-substitutions): New variable.
(sbcl)[source]: Add snippet.
[native-search-paths]: Add XDG_DATA_DIRS.
Signed-off-by: 宋文武 <iyzsong@gmail.com>
Diffstat (limited to 'gnu/packages/lisp.scm')
-rw-r--r-- | gnu/packages/lisp.scm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 2e50897594..73ebc38950 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -47,6 +47,17 @@ #:use-module (ice-9 match) #:use-module (srfi srfi-1)) +(define (asdf-substitutions lisp) + ;; Prepend XDG_DATA_DIRS/LISP-bundle-systems to ASDF's + ;; 'default-system-source-registry'. + `((("\\(,dir \"systems/\"\\)\\)") + (format #f + "(,dir \"~a-bundle-systems\"))) + + ,@(loop :for dir :in (xdg-data-dirs \"common-lisp/\") + :collect `(:directory (,dir \"systems\"))" + ,lisp)))) + (define-public gcl (package (name "gcl") @@ -226,7 +237,12 @@ an interpreter, a compiler, a debugger, and much more.") (uri (string-append "mirror://sourceforge/sbcl/sbcl/" version "/sbcl-" version "-source.tar.bz2")) (sha256 - (base32 "0fjdqnb2rsm2vi9794ywp27jr239ddvzc4xfr0dk49jd4v7p2kc5")))) + (base32 "0fjdqnb2rsm2vi9794ywp27jr239ddvzc4xfr0dk49jd4v7p2kc5")) + (modules '((guix build utils))) + (snippet + ;; Add sbcl-bundle-systems to 'default-system-source-registry'. + `(substitute* "contrib/asdf/asdf.lisp" + ,@(asdf-substitutions name))))) (build-system gnu-build-system) (outputs '("out" "doc")) ;; Bootstrap with CLISP. @@ -315,6 +331,10 @@ an interpreter, a compiler, a debugger, and much more.") #t)))) ;; No 'check' target, though "make.sh" (build phase) runs tests. #:tests? #f)) + (native-search-paths + (list (search-path-specification + (variable "XDG_DATA_DIRS") + (files '("share"))))) (home-page "http://www.sbcl.org/") (synopsis "Common Lisp implementation") (description "Steel Bank Common Lisp (SBCL) is a high performance Common |