unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Patterson <ajpatter@uwaterloo.ca>
To: guix-devel@gnu.org
Subject: Re: [PATCH 0/12]: Add asdf-build-system.
Date: Wed, 28 Sep 2016 22:30:05 -0400	[thread overview]
Message-ID: <20160928223005.3efee184@uwaterloo.ca> (raw)
In-Reply-To: <20160927041532.27097-1-ajpatter@uwaterloo.ca>

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

On Tue, 27 Sep 2016 00:15:20 -0400
Andy Patterson <ajpatter@uwaterloo.ca> 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

[-- Attachment #2: 0001-gnu-sbcl-Honour-GUIX_SBCL_SOURCE_REGISTRY.patch --]
[-- Type: text/x-patch, Size: 2565 bytes --]

From ec4e6fef499dede3b591282c4ced2153dde4f661 Mon Sep 17 00:00:00 2001
From: Andy Patterson <ajpatter@uwaterloo.ca>
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


[-- Attachment #3: 0002-gnu-ecl-Honour-GUIX_ECL_SOURCE_REGISTRY.patch --]
[-- Type: text/x-patch, Size: 1948 bytes --]

From aa81b363dfcaec8b82e66dd9db9f0c4fa0ef52f8 Mon Sep 17 00:00:00 2001
From: Andy Patterson <ajpatter@uwaterloo.ca>
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


  parent reply	other threads:[~2016-09-29  2:36 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27  4:15 [PATCH 0/12]: Add asdf-build-system Andy Patterson
2016-09-27  4:15 ` [PATCH 01/12] build-system: " Andy Patterson
2016-09-27  4:15 ` [PATCH 02/12] gnu: Add alexandria Andy Patterson
2016-10-08 12:43   ` Ludovic Courtès
2016-09-27  4:15 ` [PATCH 03/12] gnu: Add fiveam Andy Patterson
2016-10-08 12:48   ` Ludovic Courtès
2016-09-27  4:15 ` [PATCH 04/12] gnu: Add bordeaux-threads Andy Patterson
2016-09-27  4:15 ` [PATCH 05/12] gnu: Add trivial-gray-streams Andy Patterson
2016-09-27  4:15 ` [PATCH 06/12] gnu: Add flexi-streams Andy Patterson
2016-09-27  4:15 ` [PATCH 07/12] gnu: Add cl-ppcre Andy Patterson
2016-09-27  4:15 ` [PATCH 08/12] gnu: Add clx Andy Patterson
2016-09-27  4:15 ` [PATCH 09/12] gnu: Add stumpwm Andy Patterson
2016-09-27  4:15 ` [PATCH 10/12] gnu: Add slynk Andy Patterson
2016-10-08 12:59   ` Ludovic Courtès
2016-09-27  4:15 ` [PATCH 11/12] gnu: Add stumpwm-with-slynk-sbcl Andy Patterson
2016-09-27  4:15 ` [PATCH 12/12] gnu: Add stumpwm-with-slynk-image-sbcl Andy Patterson
2016-09-27 12:51 ` [PATCH 0/12]: Add asdf-build-system James Richardson
2016-09-29  2:30 ` Andy Patterson [this message]
2016-09-30 11:45   ` 宋文武
2016-10-03  2:41     ` Andy Patterson
2016-10-03  2:41 ` [PATCH v2 00/13]: " Andy Patterson
2016-10-03  2:41   ` [PATCH v2 01/13] build-system: " Andy Patterson
2016-10-05  4:55     ` 宋文武
2016-10-05 20:59       ` Andy Patterson
2016-10-07  8:07         ` Andy Patterson
2016-10-07  8:07     ` Andy Patterson
2016-10-07 12:44       ` Ludovic Courtès
2016-10-07 21:57         ` Andy Patterson
2016-10-08 12:39           ` Ludovic Courtès
2016-10-03  2:41   ` [PATCH v2 02/13] gnu: sbcl: Honour XDG_DATA_DIRS Andy Patterson
2016-10-03  2:41   ` [PATCH v2 03/13] gnu: ecl: " Andy Patterson
2016-10-03  2:41   ` [PATCH v2 04/13] gnu: Add cl-alexandria Andy Patterson
2016-10-03  2:41   ` [PATCH v2 05/13] gnu: Add cl-fiveam Andy Patterson
2016-10-03  2:41   ` [PATCH v2 06/13] gnu: Add cl-bordeaux-threads Andy Patterson
2016-10-03  2:41   ` [PATCH v2 07/13] gnu: Add cl-trivial-gray-streams Andy Patterson
2016-10-03  2:41   ` [PATCH v2 08/13] gnu: Add cl-flexi-streams Andy Patterson
2016-10-03  2:41   ` [PATCH v2 09/13] gnu: Add cl-ppcre Andy Patterson
2016-10-03  2:41   ` [PATCH v2 10/13] gnu: Add cl-clx Andy Patterson
2016-10-03  2:41   ` [PATCH v2 11/13] gnu: Add cl-stumpwm Andy Patterson
2016-10-07  8:07     ` Andy Patterson
2016-10-03  2:41   ` [PATCH v2 12/13] gnu: Add cl-slynk Andy Patterson
2016-10-07  8:07     ` Andy Patterson
2016-10-03  2:41   ` [PATCH v2 13/13] gnu: Add sbcl-stumpwm-with-slynk Andy Patterson
2016-10-07  8:07     ` Andy Patterson
2016-10-06 21:04   ` [PATCH v2 00/13]: Add asdf-build-system Ludovic Courtès
2016-10-07  0:59     ` 宋文武
2016-10-08 13:30   ` 宋文武
2016-10-08 13:00 ` [PATCH 0/12]: " Ludovic Courtès
2016-10-08 13:28   ` 宋文武
2016-10-10 17:54     ` Andy Patterson
2016-10-10 17:47   ` Andy Patterson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160928223005.3efee184@uwaterloo.ca \
    --to=ajpatter@uwaterloo.ca \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).