From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christopher Allan Webber Newsgroups: gmane.lisp.guile.devel Subject: guile2.2-gdbm-ffi issue Date: Fri, 10 Feb 2017 19:27:21 -0600 Message-ID: <87h941y0sm.fsf@dustycloud.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1486776461 392 195.159.176.226 (11 Feb 2017 01:27:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2017 01:27:41 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.1.1 To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 11 02:27:34 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccMTL-00081E-QZ for guile-devel@m.gmane.org; Sat, 11 Feb 2017 02:27:31 +0100 Original-Received: from localhost ([::1]:46716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccMTP-0003TV-OD for guile-devel@m.gmane.org; Fri, 10 Feb 2017 20:27:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccMTH-0003TO-7v for guile-devel@gnu.org; Fri, 10 Feb 2017 20:27:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccMTF-00023R-OA for guile-devel@gnu.org; Fri, 10 Feb 2017 20:27:27 -0500 Original-Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:35660) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ccMTF-00023I-It for guile-devel@gnu.org; Fri, 10 Feb 2017 20:27:25 -0500 Original-Received: from oolong (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id D141826605 for ; Fri, 10 Feb 2017 20:27:22 -0500 (EST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c02::f03c:91ff:feae:cb51 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:18900 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain 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? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-guile-gdbm-ffi-Write-to-correct-guile-output-directo.patch Content-Transfer-Encoding: quoted-printable From=20711a23036417807d444729eaa778c9cadffa8646 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 10 Feb 2017 19:24:57 -0600 Subject: [PATCH 3/3] guile-gdbm-ffi: Write to correct guile output director= y. * gnu/packages/guile.scm (make-guile-gdbm-ffi): New variable. (guile-gdbm-ffi, guile2.2-gdbm-ffi): Use make-guile-gdbm-ffi. =2D-- 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 =2D-- 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. =20 =2D(define-public guile-gdbm-ffi +(define (make-guile-gdbm-ffi guile-2.2?) (package =2D (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)) =20 (let* ((out (assoc-ref %outputs "out")) =2D (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 =2D `(("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+))) =20 +(define-public guile-gdbm-ffi + (make-guile-gdbm-ffi #f)) + (define-public guile2.2-gdbm-ffi =2D (package-for-guile-2.2 guile-gdbm-ffi)) + (make-guile-gdbm-ffi #t)) =20 (define-public guile-sqlite3 (let ((commit "607721fe1174a299e45d457acacf94eefb964071")) =2D-=20 2.11.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEUQqGKOKndniPjHCcS8Alkl/49NMFAlieaHoACgkQS8Alkl/4 9NMK/Q//QFBCuTKCwHr1Fou9BuA7WXpCBao3WHOl/zJ3aG+27aKRgfXAkAuo82l0 8UYbyiqqkkUBNubz5cDqURhi0Kt+LWv2vjMHTzAFXwRJRy/xQ2U5UstqNC9eQR6b ZyRkBqqIYql9tB16b30TMQT7w139Lww6JTxNkMDQdWwTX7LGYp2Pevs6rJ19OM4s pSbkz47NWBM18/V/wxeGlSJIKTac0Q3vwMff/LKfzeexoBLkOm/5v2TDY63rp7Ne q4+Ex53MUpUOX7aMO4R/6g1hPdRnvocMnNzFf3JGwt/YXAPik33IjsNPItjrmeSH 5exaOZo63+ZABHQqeKXlUGjdR8Stmb55LCQnSyiriMO8IfWLlYskbjUPXSZANz9h fArGI6Ex627TKTQhea2WKtmj2TgWUfFYcmDB0F5mMv55gs77qDQ8Z1Rcag8A0zhv KR4pXPJIxUPp7eGax9+nq2g+Bd8PQnK+CdbPOA70W1FFUQCGH6GYdOfxSghckMzQ MpSByCjfyrClQK3I0DQPBPyAjW3peEuJcdskEacyyUR4GcwLrQepgRBEdx8h8l/y M+yXPvFAOshkRigxGFSCbMMYHKJkAmePQAblwII/18PIhRUSKog0rJQO5D+nNqHC fBzfaIii+hG5jUbFu5/xf2Yn4jainAU/Lmo7m1n91+d7eiPUijk= =tFzp -----END PGP SIGNATURE----- --==-=-=--