GNU bug report logs - #47528
[PATCH] gnu: Add guile2.2-bash.

Previous Next

Package: guix-patches;

Reported by: david larsson <david.larsson <at> selfhosted.xyz>

Date: Wed, 31 Mar 2021 18:46:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 47528 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#47528; Package guix-patches. (Wed, 31 Mar 2021 18:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to david larsson <david.larsson <at> selfhosted.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 31 Mar 2021 18:46:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: david larsson <david.larsson <at> selfhosted.xyz>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add guile2.2-bash.
Date: Wed, 31 Mar 2021 20:45:04 +0200
[Message part 1 (text/plain, inline)]
From 00288ef6849c78b09c2934bd4565af76cccc2825 Mon Sep 17 00:00:00 2001
From: methuselah-0 <david.larsson <at> selfhosted.xyz>
Date: Wed, 31 Mar 2021 20:43:16 +0200
Subject: [PATCH] gnu: Add guile2.2-bash.

* gnu/packages/guile-xyz.scm (guile2.2-bash): New variable.
---
 gnu/packages/guile-xyz.scm | 68 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index c798bed817..90f2ec720e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -36,6 +36,7 @@
 ;;; Copyright © 2021 Bonface Munyoki Kilyungi <me <at> bonfacemunyoki.com>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
 ;;; Copyright © 2021 Leo Le Bouter <lle-bout <at> zaclys.net>
+;;; Copyright © 2021 David Larsson <david.larsson <at> selfhosted.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -429,6 +430,73 @@ enable -f ~/.guix-profile/lib/bash/libguile-bash.so 
scm
 and then run @command{scm example.scm}.")
       (license license:gpl3+))))

+(define-public guile2.2-bash
+  (let ((commit "678e06df1e9f786ba87b47b18fa5c041eb0e3e86")
+        (revision "1"))
+    (package
+      (name "guile2.2-bash")
+      (version (string-append "0.1.6-" revision "." (string-take commit 
7)))
+      (home-page
+       "https://gitlab.com/methuselah-0/guile-bash")
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (commit commit)
+                      (url 
"https://gitlab.com/methuselah-0/guile-bash.git")))
+                (sha256
+                 (base32
+                  
"1dipzbyy3jlc3d40v5vbf4a9vlw6fyv4b03hfvj94iy3papji5sn"))
+                (file-name (string-append name "-" version 
"-checkout"))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:configure-flags
+         ;; Add -I to match 'bash.pc' of Bash 4.4.
+         (list (string-append "CPPFLAGS=-I"
+                              (assoc-ref %build-inputs "bash:include")
+                              "/include/bash/include")
+
+               ;; The '.a' file is useless.
+               "--disable-static"
+
+               ;; Install 'lib/bash' as Bash 4.4 expects.
+               (string-append "--libdir=" (assoc-ref %outputs "out")
+                              "/lib/bash"))))
+      (native-inputs `(("pkg-config" ,pkg-config)
+                       ("autoconf" ,autoconf-wrapper)
+                       ("automake" ,automake)
+                       ("libtool" ,libtool)
+                       ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
+                       ("gettext" ,gettext-minimal)
+
+                       ;; Bash with loadable module support, for the 
test
+                       ;; suite.
+                       ("bash-full" ,bash)))
+      (inputs `(("guile" ,guile-2.2)
+                ("bash:include" ,bash "include")))
+      (synopsis "Extend Bash using Guile")
+      (description
+       "Guile-Bash provides a shared library and set of Guile modules,
+allowing you to extend Bash in Scheme.  Scheme interfaces allow you to 
access
+the following aspects of Bash:
+
+@itemize
+@item aliases;
+@item setting and getting Bash variables;
+@item creating dynamic variables;
+@item creating Bash functions with a Scheme implementation;
+@item reader macro for output capturing;
+@item reader macro for evaluating raw Bash commands.
+@end itemize
+
+To enable it, run:
+
+@example
+enable -f ~/.guix-profile/lib/bash/libguile-bash.so scm
+@end example
+
+and then run @command{scm \"$(pwd)\"/example.scm}.")
+      (license license:gpl3+))))
+
 (define-public guile-8sync
   (package
     (name "guile-8sync")
-- 
2.30.2

[0001-gnu-Add-guile2.2-bash.patch (text/x-diff, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#47528; Package guix-patches. (Mon, 05 Apr 2021 09:48:02 GMT) Full text and rfc822 format available.

Message #8 received at 47528 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: david larsson <david.larsson <at> selfhosted.xyz>
Cc: 47528 <at> debbugs.gnu.org
Subject: Re: bug#47528: [PATCH] gnu: Add guile2.2-bash.
Date: Mon, 05 Apr 2021 11:46:54 +0200
Hi David,

david larsson <david.larsson <at> selfhosted.xyz> skribis:

> From 00288ef6849c78b09c2934bd4565af76cccc2825 Mon Sep 17 00:00:00 2001
> From: methuselah-0 <david.larsson <at> selfhosted.xyz>
> Date: Wed, 31 Mar 2021 20:43:16 +0200
> Subject: [PATCH] gnu: Add guile2.2-bash.
>
> * gnu/packages/guile-xyz.scm (guile2.2-bash): New variable.

Since you’re maintaining your own version of ‘guile-bash’ upstream, how
about making sure that it works with Guile 3.0 (the current default in
Guix) and changing ‘guile-bash’ to refer to your version and to use
Guile 3.0?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#47528; Package guix-patches. (Mon, 05 Apr 2021 12:40:01 GMT) Full text and rfc822 format available.

Message #11 received at 47528 <at> debbugs.gnu.org (full text, mbox):

From: david larsson <david.larsson <at> selfhosted.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 47528 <at> debbugs.gnu.org
Subject: Re: bug#47528: [PATCH] gnu: Add guile2.2-bash.
Date: Mon, 05 Apr 2021 14:39:31 +0200
On 2021-04-05 11:46, Ludovic Courtès wrote:
> Hi David,
> 
> david larsson <david.larsson <at> selfhosted.xyz> skribis:
> 
>> From 00288ef6849c78b09c2934bd4565af76cccc2825 Mon Sep 17 00:00:00 2001
>> From: methuselah-0 <david.larsson <at> selfhosted.xyz>
>> Date: Wed, 31 Mar 2021 20:43:16 +0200
>> Subject: [PATCH] gnu: Add guile2.2-bash.
>> 
>> * gnu/packages/guile-xyz.scm (guile2.2-bash): New variable.
> 
> Since you’re maintaining your own version of ‘guile-bash’ upstream, how
> about making sure that it works with Guile 3.0 (the current default in
> Guix) and changing ‘guile-bash’ to refer to your version and to use
> Guile 3.0?
> 
> Thanks,
> Ludo’.

Hi, I would have liked to, but I don't understand the codebase as well 
as I want to yet so Im unable to. The project is created by Dmitry 
Bogatov, and my minor edit (removed a test-case) is just a quick-fix to 
make the package build for guile2.2. Hopefully, Dmitry will be back some 
day to maintain the project again.

Best regards,
David




This bug report was last modified 3 years and 14 days ago.

Previous Next


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