GNU bug report logs - #41389
[PATCH] gnu: guile-dsv: Wrap script.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Jack Hill <jackhill@HIDDEN>; Keywords: patch; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 41389 <at> debbugs.gnu.org:


Received: (at 41389) by debbugs.gnu.org; 24 May 2020 21:30:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 17:30:14 2020
Received: from localhost ([127.0.0.1]:38957 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcyCD-0005hQ-SG
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 17:30:14 -0400
Received: from minsky.hcoop.net ([104.248.1.95]:44330)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jackhill@HIDDEN>) id 1jcyCB-0005Xw-RF
 for 41389 <at> debbugs.gnu.org; Sun, 24 May 2020 17:30:12 -0400
Received: from marsh.hcoop.net ([45.55.52.66])
 by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <jackhill@HIDDEN>)
 id 1jcyC6-0001wz-A5; Sun, 24 May 2020 17:30:06 -0400
Date: Sun, 24 May 2020 17:30:02 -0400 (EDT)
From: Jack Hill <jackhill@HIDDEN>
X-X-Sender: jackhill@HIDDEN
To: =?ISO-8859-15?Q?Ludovic_Court=E8s?= <ludo@HIDDEN>
Subject: Re: [bug#41389] [PATCH] gnu: guile-dsv: Wrap script.
In-Reply-To: <875zcl3y1g.fsf@HIDDEN>
Message-ID: <alpine.DEB.2.20.2005241647380.5735@HIDDEN>
References: <20200519041421.10704-1-jackhill@HIDDEN>
 <87ftbq680b.fsf@HIDDEN> <alpine.DEB.2.20.2005231842130.5735@HIDDEN>
 <875zcl3y1g.fsf@HIDDEN>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
MIME-Version: 1.0
Content-Type: multipart/mixed; BOUNDARY="925712948-579561150-1590355806=:5735"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41389
Cc: 41389 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--925712948-579561150-1590355806=:5735
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Sun, 24 May 2020, Ludovic Courtès wrote:

> Jack Hill <jackhill@HIDDEN> skribis:
>
>> I had some time today, so I've done this in the second patch. This
>> required substituting configure.ac as discussed at:
>> https://github.com/artyom-poptsov/guile-dsv/pull/8
>
> Great.
>
>> Could the regular expression I used be improved?
>
> I had overlooked this question, what regexp are you referring to?

"GUILE_PKG.*" to match the line in configure.ac to be modified for Guile 
3.0 support. I think it's readable as is, and avoids the need to escape 
special characters, but it's very broad. Perhaps it should be more 
specific.

Best,
Jack
--925712948-579561150-1590355806=:5735--




Information forwarded to guix-patches@HIDDEN:
bug#41389; Package guix-patches. Full text available.

Message received at 41389 <at> debbugs.gnu.org:


Received: (at 41389) by debbugs.gnu.org; 24 May 2020 19:58:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 15:58:49 2020
Received: from localhost ([127.0.0.1]:38866 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcwll-00019S-4g
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 15:58:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:32768)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcwlg-00019C-1V
 for 41389 <at> debbugs.gnu.org; Sun, 24 May 2020 15:58:47 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36837)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcwla-0004Qn-Ne; Sun, 24 May 2020 15:58:38 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54726 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcwlY-0003uG-Jl; Sun, 24 May 2020 15:58:37 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Jack Hill <jackhill@HIDDEN>
Subject: Re: [bug#41389] [PATCH] gnu: guile-dsv: Wrap script.
References: <20200519041421.10704-1-jackhill@HIDDEN>
 <87ftbq680b.fsf@HIDDEN>
 <alpine.DEB.2.20.2005231842130.5735@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 6 Prairial an 228 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sun, 24 May 2020 21:58:35 +0200
In-Reply-To: <alpine.DEB.2.20.2005231842130.5735@HIDDEN> (Jack Hill's
 message of "Sat, 23 May 2020 18:48:05 -0400 (EDT)")
Message-ID: <875zcl3y1g.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41389
Cc: 41389 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Jack Hill <jackhill@HIDDEN> skribis:

> I had some time today, so I've done this in the second patch. This
> required substituting configure.ac as discussed at:
> https://github.com/artyom-poptsov/guile-dsv/pull/8

Great.

> Could the regular expression I used be improved?

I had overlooked this question, what regexp are you referring to?

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#41389; Package guix-patches. Full text available.

Message received at 41389-done <at> debbugs.gnu.org:


Received: (at 41389-done) by debbugs.gnu.org; 24 May 2020 19:56:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 24 15:56:46 2020
Received: from localhost ([127.0.0.1]:38860 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcwjl-00016C-P5
	for submit <at> debbugs.gnu.org; Sun, 24 May 2020 15:56:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60802)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcwjj-00015z-NV
 for 41389-done <at> debbugs.gnu.org; Sun, 24 May 2020 15:56:44 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36819)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcwje-0004Ad-CD; Sun, 24 May 2020 15:56:38 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54616 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcwjc-0000tr-ER; Sun, 24 May 2020 15:56:37 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Jack Hill <jackhill@HIDDEN>
Subject: Re: [PATCH 1/2] gnu: guile-dsv: Wrap script.
References: <alpine.DEB.2.20.2005231842130.5735@HIDDEN>
 <20200523225039.3207-1-jackhill@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 6 Prairial an 228 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sun, 24 May 2020 21:56:35 +0200
In-Reply-To: <20200523225039.3207-1-jackhill@HIDDEN> (Jack Hill's message
 of "Sat, 23 May 2020 18:50:38 -0400")
Message-ID: <87a71x3y4s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41389-done
Cc: 41389-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

Jack Hill <jackhill@HIDDEN> skribis:

> * gnu/packages/guile-xyz.scm (guile-dsv)[arguments]: Add "wrap program"
>   phase. Import target-guile-effective-version from guile-build-system fo=
r use
>   in new phase.

[...]

> * gnu/packages/guile-xyz.scm (guile-dsv)[inputs]: Replace guile-2.2 with
>   guile-3.0.
>   [propagated-inputs]: Replace guile2.2-lib with guile-lib.
>   [arguments]: Add "configure support guile3.0" phase.
>   (guile2.2-dsv): New variable.

Applied both, thank you!

Ludo=E2=80=99.




Notification sent to Jack Hill <jackhill@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Ludovic Courtès <ludo@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 41389 <at> debbugs.gnu.org:


Received: (at 41389) by debbugs.gnu.org; 23 May 2020 22:51:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 18:51:01 2020
Received: from localhost ([127.0.0.1]:35988 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jccyr-0007zb-2e
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 18:51:01 -0400
Received: from minsky.hcoop.net ([104.248.1.95]:36270)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jackhill@HIDDEN>) id 1jccyl-0007z7-Ja
 for 41389 <at> debbugs.gnu.org; Sat, 23 May 2020 18:50:56 -0400
Received: from [2001:470:8:9f5:f948:e83a:c72a:f39b]
 (helo=alperton.home.eronel.org)
 by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.89) (envelope-from <jackhill@HIDDEN>)
 id 1jccyf-00041i-DP; Sat, 23 May 2020 18:50:49 -0400
From: Jack Hill <jackhill@HIDDEN>
To: 41389 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: guile-dsv: Build with Guile 3.0.
Date: Sat, 23 May 2020 18:50:39 -0400
Message-Id: <20200523225039.3207-2-jackhill@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <20200523225039.3207-1-jackhill@HIDDEN>
References: <alpine.DEB.2.20.2005231842130.5735@HIDDEN>
 <20200523225039.3207-1-jackhill@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41389
Cc: ludo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/guile-xyz.scm (guile-dsv)[inputs]: Replace guile-2.2 with
  guile-3.0.
  [propagated-inputs]: Replace guile2.2-lib with guile-lib.
  [arguments]: Add "configure support guile3.0" phase.
  (guile2.2-dsv): New variable.
---
 gnu/packages/guile-xyz.scm | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index b1c1fd0f62..8dfce091ef 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -465,8 +465,8 @@ you send to a FIFO file.")
        ("automake" ,automake)
        ("pkg-config" ,pkg-config)
        ("texinfo" ,texinfo)))
-    (inputs `(("guile" ,guile-2.2)))
-    (propagated-inputs `(("guile2.2-lib" ,guile2.2-lib)))
+    (inputs `(("guile" ,guile-3.0)))
+    (propagated-inputs `(("guile-lib" ,guile-lib)))
     (arguments
      `(#:modules (((guix build guile-build-system)
                    #:select (target-guile-effective-version))
@@ -474,6 +474,14 @@ you send to a FIFO file.")
        #:imported-modules ((guix build guile-build-system)
                            ,@%gnu-build-system-modules)
        #:phases (modify-phases %standard-phases
+                  ;; Support Guile 3.0 in configure from upstream commit
+                  ;; 4c724577ccf19bb88580f72f2f6b166a0447ce3f
+                  (add-before 'bootstrap 'configure-support-guile3.0
+                    (lambda _
+                      (substitute* "configure.ac"
+                                  (("GUILE_PKG.*")
+                                   "GUILE_PKG([3.0 2.0 2.2])"))
+                      #t))
                   (add-before 'configure 'set-guilesitedir
                     (lambda _
                       (substitute* "Makefile.in"
@@ -493,7 +501,7 @@ $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
                     (lambda* (#:key inputs outputs #:allow-other-keys)
                       (let* ((out (assoc-ref outputs "out"))
                              (bin (string-append out "/bin"))
-                             (guile-lib (assoc-ref inputs "guile2.2-lib"))
+                             (guile-lib (assoc-ref inputs "guile-lib"))
                              (version (target-guile-effective-version))
                              (scm (string-append "/share/guile/site/"
                                                  version))
@@ -515,6 +523,13 @@ delimiter-separated values (DSV) data format.  Guile-DSV supports the
 Unix-style DSV format and RFC 4180 format.")
     (license license:gpl3+)))
 
+(define-public guile2.2-dsv
+  (package
+    (inherit guile-dsv)
+    (name "guile2.2-dsv")
+    (inputs `(("guile" ,guile-2.2)))
+    (propagated-inputs `(("guile-lib" ,guile2.2-lib)))))
+
 (define-public guile-fibers
   (package
     (name "guile-fibers")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41389; Package guix-patches. Full text available.

Message received at 41389 <at> debbugs.gnu.org:


Received: (at 41389) by debbugs.gnu.org; 23 May 2020 22:50:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 18:50:57 2020
Received: from localhost ([127.0.0.1]:35986 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jccym-0007zP-Oj
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 18:50:57 -0400
Received: from minsky.hcoop.net ([104.248.1.95]:36266)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jackhill@HIDDEN>) id 1jccyk-0007z6-EN
 for 41389 <at> debbugs.gnu.org; Sat, 23 May 2020 18:50:54 -0400
Received: from [2001:470:8:9f5:f948:e83a:c72a:f39b]
 (helo=alperton.home.eronel.org)
 by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.89) (envelope-from <jackhill@HIDDEN>)
 id 1jccyf-00041i-6x; Sat, 23 May 2020 18:50:49 -0400
From: Jack Hill <jackhill@HIDDEN>
To: 41389 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: guile-dsv: Wrap script.
Date: Sat, 23 May 2020 18:50:38 -0400
Message-Id: <20200523225039.3207-1-jackhill@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <alpine.DEB.2.20.2005231842130.5735@HIDDEN>
References: <alpine.DEB.2.20.2005231842130.5735@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41389
Cc: ludo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/guile-xyz.scm (guile-dsv)[arguments]: Add "wrap program"
  phase. Import target-guile-effective-version from guile-build-system for use
  in new phase.
---
 gnu/packages/guile-xyz.scm | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index a1deee32d1..b1c1fd0f62 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2019 Timothy Sample <samplet@HIDDEN>
 ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@HIDDEN>
 ;;; Copyright © 2020 Evan Straw <evan.straw99@HIDDEN>
+;;; Copyright © 2020 Jack Hill <jackhill@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -467,7 +468,12 @@ you send to a FIFO file.")
     (inputs `(("guile" ,guile-2.2)))
     (propagated-inputs `(("guile2.2-lib" ,guile2.2-lib)))
     (arguments
-     '(#:phases (modify-phases %standard-phases
+     `(#:modules (((guix build guile-build-system)
+                   #:select (target-guile-effective-version))
+                  ,@%gnu-build-system-modules)
+       #:imported-modules ((guix build guile-build-system)
+                           ,@%gnu-build-system-modules)
+       #:phases (modify-phases %standard-phases
                   (add-before 'configure 'set-guilesitedir
                     (lambda _
                       (substitute* "Makefile.in"
@@ -482,6 +488,24 @@ $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
                         (("^guilesitedir =.*$")
                          "guilesitedir = \
 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
+                      #t))
+                  (add-after 'install 'wrap-program
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (bin (string-append out "/bin"))
+                             (guile-lib (assoc-ref inputs "guile2.2-lib"))
+                             (version (target-guile-effective-version))
+                             (scm (string-append "/share/guile/site/"
+                                                 version))
+                             (go (string-append  "/lib/guile/"
+                                                 version "/site-ccache")))
+                        (wrap-program (string-append bin "/dsv")
+                          `("GUILE_LOAD_PATH" prefix
+                            (,(string-append out scm)
+                             ,(string-append guile-lib scm)))
+                          `("GUILE_LOAD_COMPILED_PATH" prefix
+                            (,(string-append out go)
+                             ,(string-append guile-lib go)))))
                       #t)))))
     (home-page "https://github.com/artyom-poptsov/guile-dsv")
     (synopsis "DSV module for Guile")
-- 
2.26.2





Information forwarded to guix-patches@HIDDEN:
bug#41389; Package guix-patches. Full text available.

Message received at 41389 <at> debbugs.gnu.org:


Received: (at 41389) by debbugs.gnu.org; 23 May 2020 22:48:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 18:48:12 2020
Received: from localhost ([127.0.0.1]:35970 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jccw8-0007v5-LP
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 18:48:12 -0400
Received: from minsky.hcoop.net ([104.248.1.95]:36252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jackhill@HIDDEN>) id 1jccw7-0007ut-5G
 for 41389 <at> debbugs.gnu.org; Sat, 23 May 2020 18:48:11 -0400
Received: from marsh.hcoop.net ([45.55.52.66])
 by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <jackhill@HIDDEN>)
 id 1jccw2-0003tb-0N; Sat, 23 May 2020 18:48:06 -0400
Date: Sat, 23 May 2020 18:48:05 -0400 (EDT)
From: Jack Hill <jackhill@HIDDEN>
X-X-Sender: jackhill@HIDDEN
To: =?ISO-8859-15?Q?Ludovic_Court=E8s?= <ludo@HIDDEN>
Subject: Re: [bug#41389] [PATCH] gnu: guile-dsv: Wrap script.
In-Reply-To: <87ftbq680b.fsf@HIDDEN>
Message-ID: <alpine.DEB.2.20.2005231842130.5735@HIDDEN>
References: <20200519041421.10704-1-jackhill@HIDDEN>
 <87ftbq680b.fsf@HIDDEN>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
MIME-Version: 1.0
Content-Type: multipart/mixed; BOUNDARY="925712948-1663286037-1590274086=:5735"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 41389
Cc: 41389 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--925712948-1663286037-1590274086=:5735
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8BIT

Ludo’,

Thanks for the review!

On Sat, 23 May 2020, Ludovic Courtès wrote:

> Hi,
>
> Jack Hill <jackhill@HIDDEN> skribis:
>
>> * gnu/packages/guile-xyz.scm (guile-dsv)[arguments]: Add "wrap program" phase.
>
> [...]
>
>> +                  (add-after 'install 'wrap-program
>> +                    (lambda* (#:key inputs outputs #:allow-other-keys)
>> +                      (let* ((out (assoc-ref outputs "out"))
>> +                             (bin (string-append out "/bin"))
>> +                             (site (string-append out "/share/guile/site"))
>> +                             (guile-lib (assoc-ref inputs "guile2.2-lib")))
>
> We should eventually rename it to “guile-lib” and switch to Guile 3.0,
> but that’s another story.

I had some time today, so I've done this in the second patch. This 
required substituting configure.ac as discussed at: 
https://github.com/artyom-poptsov/guile-dsv/pull/8

Could the regular expression I used be improved?

>> +                        (match (scandir site)
>> +                          (("." ".." version)
>
> I recommend ‘target-guile-effective-version’ from (guix build
> guile-build-system) instead of this trick.
>
> Could you send an updated patch?

Thanks for the tip. I did this, and cleaned up the up the let binding and 
wrap-program calls while I was at it. I hope it makes it clearer.

> Thanks in advance!

You're welcome!

Best,
Jack
--925712948-1663286037-1590274086=:5735--




Information forwarded to guix-patches@HIDDEN:
bug#41389; Package guix-patches. Full text available.

Message received at 41389 <at> debbugs.gnu.org:


Received: (at 41389) by debbugs.gnu.org; 23 May 2020 14:28:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 23 10:28:14 2020
Received: from localhost ([127.0.0.1]:35260 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jcV8I-0001yI-8Q
	for submit <at> debbugs.gnu.org; Sat, 23 May 2020 10:28:14 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53850)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jcV8G-0001y2-LS
 for 41389 <at> debbugs.gnu.org; Sat, 23 May 2020 10:28:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43694)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jcV8B-0008Pc-8t; Sat, 23 May 2020 10:28:07 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52306 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jcV8A-0003rT-F2; Sat, 23 May 2020 10:28:06 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Jack Hill <jackhill@HIDDEN>
Subject: Re: [bug#41389] [PATCH] gnu: guile-dsv: Wrap script.
References: <20200519041421.10704-1-jackhill@HIDDEN>
Date: Sat, 23 May 2020 16:28:04 +0200
In-Reply-To: <20200519041421.10704-1-jackhill@HIDDEN> (Jack Hill's
 message of "Tue, 19 May 2020 00:14:21 -0400")
Message-ID: <87ftbq680b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 41389
Cc: 41389 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Jack Hill <jackhill@HIDDEN> skribis:

> * gnu/packages/guile-xyz.scm (guile-dsv)[arguments]: Add "wrap program" p=
hase.

[...]

> +                  (add-after 'install 'wrap-program
> +                    (lambda* (#:key inputs outputs #:allow-other-keys)
> +                      (let* ((out (assoc-ref outputs "out"))
> +                             (bin (string-append out "/bin"))
> +                             (site (string-append out "/share/guile/site=
"))
> +                             (guile-lib (assoc-ref inputs "guile2.2-lib"=
)))

We should eventually rename it to =E2=80=9Cguile-lib=E2=80=9D and switch to=
 Guile 3.0,
but that=E2=80=99s another story.

> +                        (match (scandir site)
> +                          (("." ".." version)

I recommend =E2=80=98target-guile-effective-version=E2=80=99 from (guix bui=
ld
guile-build-system) instead of this trick.

Could you send an updated patch?

Thanks in advance!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#41389; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 19 May 2020 04:14:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 19 00:14:35 2020
Received: from localhost ([127.0.0.1]:48883 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jateE-0005Qg-Tg
	for submit <at> debbugs.gnu.org; Tue, 19 May 2020 00:14:35 -0400
Received: from lists.gnu.org ([209.51.188.17]:36540)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jackhill@HIDDEN>) id 1jateD-0005QX-Qq
 for submit <at> debbugs.gnu.org; Tue, 19 May 2020 00:14:34 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57260)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jackhill@HIDDEN>)
 id 1jateD-0001Ry-LU
 for guix-patches@HIDDEN; Tue, 19 May 2020 00:14:33 -0400
Received: from minsky.hcoop.net ([104.248.1.95]:52142)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jackhill@HIDDEN>)
 id 1jateC-0006jj-CH
 for guix-patches@HIDDEN; Tue, 19 May 2020 00:14:33 -0400
Received: from [2001:470:8:9f5:f948:e83a:c72a:f39b]
 (helo=alperton.home.eronel.org)
 by minsky.hcoop.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.89) (envelope-from <jackhill@HIDDEN>)
 id 1jateB-0000Jd-Dt
 for guix-patches@HIDDEN; Tue, 19 May 2020 00:14:31 -0400
From: Jack Hill <jackhill@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: guile-dsv: Wrap script.
Date: Tue, 19 May 2020 00:14:21 -0400
Message-Id: <20200519041421.10704-1-jackhill@HIDDEN>
X-Mailer: git-send-email 2.26.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=104.248.1.95; envelope-from=jackhill@HIDDEN;
 helo=minsky.hcoop.net
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/19 00:14:31
X-ACL-Warn: Detected OS   = Linux 3.11 and newer
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

* gnu/packages/guile-xyz.scm (guile-dsv)[arguments]: Add "wrap program" phase.
---
 gnu/packages/guile-xyz.scm | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 674b1f922b..ee2e44653e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2019 Timothy Sample <samplet@HIDDEN>
 ;;; Copyright © 2019, 2020 Martin Becze <mjbecze@HIDDEN>
 ;;; Copyright © 2020 Evan Straw <evan.straw99@HIDDEN>
+;;; Copyright © 2020 Jack Hill <jackhill@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -467,7 +468,9 @@ you send to a FIFO file.")
     (inputs `(("guile" ,guile-2.2)))
     (propagated-inputs `(("guile2.2-lib" ,guile2.2-lib)))
     (arguments
-     '(#:phases (modify-phases %standard-phases
+     `(#:modules ((ice-9 match) (ice-9 ftw)
+                  ,@%gnu-build-system-modules)
+       #:phases (modify-phases %standard-phases
                   (add-before 'configure 'set-guilesitedir
                     (lambda _
                       (substitute* "Makefile.in"
@@ -482,6 +485,28 @@ $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
                         (("^guilesitedir =.*$")
                          "guilesitedir = \
 $(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n"))
+                      #t))
+                  (add-after 'install 'wrap-program
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (bin (string-append out "/bin"))
+                             (site (string-append out "/share/guile/site"))
+                             (guile-lib (assoc-ref inputs "guile2.2-lib")))
+                        (match (scandir site)
+                          (("." ".." version)
+                           (let ((modules (string-append site "/" version))
+                                 (compiled-modules (string-append
+                                                    out "/lib/guile/" version
+                                                    "/site-ccache")))
+                             (wrap-program (string-append bin "/dsv")
+                               `("GUILE_LOAD_PATH" prefix
+                                 (,modules
+                                  ,(string-append guile-lib "/share/guile/site")))
+                               `("GUILE_LOAD_COMPILED_PATH" prefix
+                                 (,compiled-modules
+                                  ,(string-append guile-lib "/lib/guile/"
+                                                  version
+                                                  "/site-ccache"))))))))
                       #t)))))
     (home-page "https://github.com/artyom-poptsov/guile-dsv")
     (synopsis "DSV module for Guile")
-- 
2.26.2





Acknowledgement sent to Jack Hill <jackhill@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#41389; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 24 May 2020 21:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.