>From ec4e6fef499dede3b591282c4ced2153dde4f661 Mon Sep 17 00:00:00 2001 From: Andy Patterson Date: Wed, 28 Sep 2016 19:04:44 -0400 Subject: [PATCH 1/2] gnu: sbcl: Honour GUIX_SBCL_SOURCE_REGISTRY. * gnu/packages/lisp.scm (asdf-substitutions): New variable. (sbcl) [source]: Add snippet. [native-search-paths]: Add GUIX_SBCL_SOURCE_REGISTRY. --- gnu/packages/lisp.scm | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 5bbd672..4564549 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -47,6 +47,20 @@ #:use-module (gnu packages version-control) #:use-module (ice-9 match)) +(define (asdf-substitutions lisp) + `((("\\(defun environment-source-registry \\(\\)") + (format #f + " + (defun guix-source-registry () (getenv \"GUIX_~a_SOURCE_REGISTRY\")) + + (defun environment-source-registry ()" + ,(string-upcase lisp))) + (("\\(environment-source-registry") + "(guix-source-registry + environment-source-registry") + (("#:environment-source-registry") + "#:environment-source-registry #:guix-source-registry"))) + (define-public gcl (package (name "gcl") @@ -226,7 +240,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 $GUIX_SBCL_SOURCE_REGISTRY to *default-source-registries* + `(substitute* "contrib/asdf/asdf.lisp" + ,@(asdf-substitutions name))))) (build-system gnu-build-system) (outputs '("out" "doc")) ;; Bootstrap with CLISP. @@ -315,6 +334,11 @@ 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 "GUIX_SBCL_SOURCE_REGISTRY") + (files '("share/common-lisp/sbcl-bundle-systems" + "share/common-lisp/systems"))))) (home-page "http://www.sbcl.org/") (synopsis "Common Lisp implementation") (description "Steel Bank Common Lisp (SBCL) is a high performance Common -- 2.10.0