all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* guile2.2-gdbm-ffi issue
@ 2017-02-11  1:29 Christopher Allan Webber
  2017-02-11 17:08 ` Fixing non-reproducibility in some guile packages (was: guile2.2-gdbm-ffi issue) Christopher Allan Webber
  0 siblings, 1 reply; 10+ messages in thread
From: Christopher Allan Webber @ 2017-02-11  1:29 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 804 bytes --]

(Originally accidentally sent this to guile-devel@gnu.org ... sorry!)

Hiya,

I pushed guile2.2-gdbm because it was just a couple of lines and it
seemed to work and didn't affect anything.  I made a mistake though that
I didn't realize until I ran
"guix environment --ad-hoc guile-next guile2.2-gdbm-ffi --pure".
The trivial-build-system in guile-gdbm-ffi dumps the built module into
(string-append out "/share/guile/site/2.0") ... oops!  Before I ran
--pure, the 2.0 directory was on my load path, and thus I didn't bump
into the error.  (Maybe I should have asked for review anyway...)

I'm trying to think of how to fix this.  I have a very kludgy solution
attached.  I don't feel great about it but I don't know how to signal to
the builder whether it's using guile 2.2 or 2.0 otherwise.  Thoughts?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-guile-gdbm-ffi-Write-to-correct-guile-output-directo.patch --]
[-- Type: text/x-patch, Size: 2606 bytes --]

From 711a23036417807d444729eaa778c9cadffa8646 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Fri, 10 Feb 2017 19:24:57 -0600
Subject: [PATCH 3/3] guile-gdbm-ffi: Write to correct guile output directory.

* gnu/packages/guile.scm (make-guile-gdbm-ffi): New variable.
(guile-gdbm-ffi, guile2.2-gdbm-ffi): Use make-guile-gdbm-ffi.
---
 gnu/packages/guile.scm | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 3e8ab007b..3e62949f2 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -825,9 +825,11 @@ inspired by the SCSH regular expression system.")
 ;; There are two guile-gdbm packages, one using the FFI and one with
 ;; direct C bindings, hence the verbose name.
 
-(define-public guile-gdbm-ffi
+(define (make-guile-gdbm-ffi guile-2.2?)
   (package
-    (name "guile-gdbm-ffi")
+    (name (if guile-2.2?
+              "guile2.2-gdbm-ffi"
+              "guile-gdbm-ffi"))
     (version "20120209.fa1d5b6")
     (source (origin
               (method git-fetch)
@@ -848,7 +850,9 @@ inspired by the SCSH regular expression system.")
                       (system base compile))
 
          (let* ((out (assoc-ref %outputs "out"))
-                (module-dir (string-append out "/share/guile/site/2.0"))
+                (module-dir (string-append out "/share/guile/site/"
+                                           ,(if guile-2.2?
+                                                "2.2" "2.0")))
                 (source (assoc-ref %build-inputs "source"))
                 (doc (string-append out "/share/doc"))
                 (guild (string-append (assoc-ref %build-inputs "guile")
@@ -877,7 +881,8 @@ inspired by the SCSH regular expression system.")
            (compile-file gdbm.scm-dest
                          #:output-file gdbm.go-dest)))))
     (inputs
-     `(("guile" ,guile-2.0)))
+     `(("guile" ,(if guile-2.2?
+                     guile-next guile-2.0))))
     (propagated-inputs
      `(("gdbm" ,gdbm)))
     (home-page "https://github.com/ijp/guile-gdbm")
@@ -887,8 +892,11 @@ inspired by the SCSH regular expression system.")
 Guile's foreign function interface.")
     (license gpl3+)))
 
+(define-public guile-gdbm-ffi
+  (make-guile-gdbm-ffi #f))
+
 (define-public guile2.2-gdbm-ffi
-  (package-for-guile-2.2 guile-gdbm-ffi))
+  (make-guile-gdbm-ffi #t))
 
 (define-public guile-sqlite3
   (let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
-- 
2.11.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-13 17:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-11  1:29 guile2.2-gdbm-ffi issue Christopher Allan Webber
2017-02-11 17:08 ` Fixing non-reproducibility in some guile packages (was: guile2.2-gdbm-ffi issue) Christopher Allan Webber
2017-02-11 21:20   ` Fixing non-reproducibility in some guile packages Jan Nieuwenhuizen
2017-02-12 17:29     ` Christopher Allan Webber
2017-02-13  6:18       ` Maxim Cournoyer
2017-02-13  7:13         ` Andy Wingo
2017-02-13 16:25           ` Christopher Allan Webber
2017-02-13 17:39           ` Maxim Cournoyer
2017-02-13 14:40       ` Ludovic Courtès
2017-02-13 16:42         ` Christopher Allan Webber

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.