unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: david larsson <david.larsson@selfhosted.xyz>
To: 47528@debbugs.gnu.org
Subject: [bug#47528] [PATCH] gnu: Add guile2.2-bash.
Date: Wed, 31 Mar 2021 20:45:04 +0200	[thread overview]
Message-ID: <cddcb5d9a62440d4e07168df27864c43@selfhosted.xyz> (raw)

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

 From 00288ef6849c78b09c2934bd4565af76cccc2825 Mon Sep 17 00:00:00 2001
 From: methuselah-0 <david.larsson@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@bonfacemunyoki.com>
  ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 David Larsson <david.larsson@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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-guile2.2-bash.patch --]
[-- Type: text/x-diff; name=0001-gnu-Add-guile2.2-bash.patch, Size: 3687 bytes --]

From 00288ef6849c78b09c2934bd4565af76cccc2825 Mon Sep 17 00:00:00 2001
From: methuselah-0 <david.larsson@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@bonfacemunyoki.com>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 David Larsson <david.larsson@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


             reply	other threads:[~2021-03-31 18:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 18:45 david larsson [this message]
2021-04-05  9:46 ` [bug#47528] [PATCH] gnu: Add guile2.2-bash Ludovic Courtès
2021-04-05 12:39   ` david larsson

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=cddcb5d9a62440d4e07168df27864c43@selfhosted.xyz \
    --to=david.larsson@selfhosted.xyz \
    --cc=47528@debbugs.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).