From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Patterson Subject: Re: [PATCH 0/12]: Add asdf-build-system. Date: Wed, 28 Sep 2016 22:30:05 -0400 Message-ID: <20160928223005.3efee184@uwaterloo.ca> References: <20160927041532.27097-1-ajpatter@uwaterloo.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/WAeEukEKHIuDVwMaaHbgFq7" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpRD2-00020h-7h for guix-devel@gnu.org; Wed, 28 Sep 2016 22:36:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpRCw-0006TO-H3 for guix-devel@gnu.org; Wed, 28 Sep 2016 22:36:27 -0400 Received: from mailservices.uwaterloo.ca ([129.97.128.141]:55385 helo=mailchk-m05.uwaterloo.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpRCw-0006Rz-AG for guix-devel@gnu.org; Wed, 28 Sep 2016 22:36:22 -0400 Received: from localhost (bas1-jockvale05-3096537436.dsl.bell.ca [184.145.105.92]) (authenticated bits=0) by mailchk-m05.uwaterloo.ca (8.14.4/8.14.4) with ESMTP id u8T2U6hB032077 (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 28 Sep 2016 22:30:10 -0400 In-Reply-To: <20160927041532.27097-1-ajpatter@uwaterloo.ca> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --MP_/WAeEukEKHIuDVwMaaHbgFq7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, 27 Sep 2016 00:15:20 -0400 Andy Patterson wrote: > Getting things to work "out of the box": I'd like to set up an > environment variable to allow implementations to find installed > libraries, but it's a bit tricky: After having thought about it some more, and having tried some things, I came up with another solution which is able to integrate with guix's existing environment variable handling. I've attached it as patches, which would probably best be applied right after the first patch in the main series, but could really go anywhere. With these changes, the system is functionally complete, so I'm just waiting for comments. Any suggestions are welcome. Thanks, -- Andy --MP_/WAeEukEKHIuDVwMaaHbgFq7 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0001-gnu-sbcl-Honour-GUIX_SBCL_SOURCE_REGISTRY.patch >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 --MP_/WAeEukEKHIuDVwMaaHbgFq7 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=0002-gnu-ecl-Honour-GUIX_ECL_SOURCE_REGISTRY.patch >From aa81b363dfcaec8b82e66dd9db9f0c4fa0ef52f8 Mon Sep 17 00:00:00 2001 From: Andy Patterson Date: Wed, 28 Sep 2016 19:06:22 -0400 Subject: [PATCH 2/2] gnu: ecl: Honour GUIX_ECL_SOURCE_REGISTRY. * gnu/packages/lisp.scm (ecl)[source]: Add snippet. [native-search-paths]: Add GUIX_ECL_SOURCE_REGISTRY. --- gnu/packages/lisp.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 4564549..4ec163a 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -126,7 +126,12 @@ interface to the Tk widget system.") "https://common-lisp.net/project/ecl/static/files/release/" name "-" version ".tgz")) (sha256 - (base32 "16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d")))) + (base32 "16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d")) + (modules '((guix build utils))) + (snippet + ;; Add $GUIX_ECL_SOURCE_REGISTRY to *default-source-registries* + `(substitute* "contrib/asdf/asdf.lisp" + ,@(asdf-substitutions name))))) (build-system gnu-build-system) ;; src/configure uses 'which' to confirm the existence of 'gzip'. (native-inputs `(("which" ,which))) @@ -167,6 +172,11 @@ interface to the Tk widget system.") `("LIBRARY_PATH" suffix ,library-directories) `("LD_LIBRARY_PATH" suffix ,library-directories))))) (add-after 'wrap 'check (assoc-ref %standard-phases 'check))))) + (native-search-paths + (list (search-path-specification + (variable "GUIX_ECL_SOURCE_REGISTRY") + (files '("share/common-lisp/ecl-bundle-systems" + "share/common-lisp/systems"))))) (home-page "http://ecls.sourceforge.net/") (synopsis "Embeddable Common Lisp") (description "ECL is an implementation of the Common Lisp language as -- 2.10.0 --MP_/WAeEukEKHIuDVwMaaHbgFq7--