gnu: Add bash-ctypes

  • Done
  • quality assurance status badge
Details
3 participants
  • Zhu Zihao
  • david larsson
  • Ludovic Courtès
Owner
unassigned
Submitted by
Zhu Zihao
Severity
normal
Z
Z
Zhu Zihao wrote on 23 Oct 2020 14:52
(address . guix-patches@gnu.org)
86wnzhm7e2.fsf@163.com

-----BEGIN PGP SIGNATURE-----

iQFJBAEBCAAzFiEE7NCVzXX6efyusptG1SOVn+xGFqYFAl+S0hUVHGFsbF9idXRf
bGFzdEAxNjMuY29tAAoJENUjlZ/sRhamAqcH/0sx9CDr6hiyKX/nAfhoBHBxRjCx
+yrQqJj/XblPHYz+8GVnSbBctPuDVNDThg4FXOsNgU/oirJPyshd7uKAh+nBwZiT
FhfthqzMs/FPayO9MFKxWrKziHq5pgGVF9ZBw37JJ2JSlnkFGuxqxxldvyfnZu5H
PWYfMcg9w0KnuIkVDBnNO9tdDgzVcp49DSYLgdJO+VmPMm0bidgl+UbjrxJKnQ4E
0Wj1qyasYlItXfHhW92prBe908uaPiIxmUBkZHxBo/UivE832uUhb8xKmV6H4nmD
hyb18FfsWRj1tKR1pVgQOf4JrvL6CDmHFU3bITz2A6V0nWRzxMga3HRIvJ0=
=MSfD
-----END PGP SIGNATURE-----

From 5a85c09398cfe96ba244eac7dec45366a139188e Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 23 Oct 2020 20:47:04 +0800
Subject: [PATCH] gnu: Add bash-ctypes

* gnu/packages/bash.scm(bash-ctypes): New variable.
---
gnu/packages/bash.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 47ca625d9a..356d0f82d6 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -26,6 +26,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages bison)
@@ -415,3 +416,25 @@ framework for Bash. It provides a simple way to verify that the UNIX programs
you write behave as expected. Bats is most useful when testing software written
in Bash, but you can use it to test any UNIX program.")
(license expat)))
+
+(define-public bash-ctypes
+ (package
+ (name "bash-ctypes")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/taviso/ctypes.sh/releases/download/"
+ version "/ctypes-sh-" version ".tar.gz"))
+ (sha256
+ (base32 "0s1sifqzqmr0dnciv06yqrpzgj11d7n0gy5zaxh6b3x8bx7k75l8"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libelf" ,libelf)
+ ("elfutils" ,elfutils)))
+ (home-page "https://github.com/taviso/ctypes.sh")
+ (synopsis "FFI for Bash")
+ (description "Bash-ctypes is a bash plugin that provides a foreign function
+interface directly in your shell. In other words, it allows you to call routines
+in shared libraries from within bash.")
+ (license expat)))
--
2.28.0
--
Retrieve my public GPG key: https://meta.sr.ht/~citreu.pgp

Zihao
Z
Z
Zhu Zihao wrote on 23 Oct 2020 15:19
Re: bug#44176: Acknowledgement (gnu: Add bash-ctypes)
(address . 44176@debbugs.gnu.org)
86mu0dm65b.fsf@163.com
Patches updated here.
-----BEGIN PGP SIGNATURE-----

iQFJBAEBCAAzFiEE7NCVzXX6efyusptG1SOVn+xGFqYFAl+S2GAVHGFsbF9idXRf
bGFzdEAxNjMuY29tAAoJENUjlZ/sRhamugkH+gPmItv1KOHuPB4/DntB4/cHFY/F
qRQbeCioUSL6cXa2KMS5FlvW0K/qThVI2ocP4DT11WAEDKma0cnsyST0VlF0E8ga
Z0Kb6F9HShQi/xHpxkrivljlNq7GexvSSlaxwL4OmqVOhZuatLMIY8nMQ1EhS1vJ
vbhBIsXeozhNCNUZx6MkjV/lOxcMjnxeGE6OX0e/Og7WM/A7dC7pw9BAsryfvBS7
IFc88RbzS8BIoRUhRMzjqJe6wuPa5k+mNZkKjUixLi8EX35XW3mfv0fJVH4Q5zyE
Ytv9wf9ARipjsC6ECtaL2ISWsqt+/c3moPnHSSqXjxAuT+p12AYfVFEMv0Q=
=0Ugg
-----END PGP SIGNATURE-----

From a41329a6df93b4b7e8ca65e62755e55ba74c6301 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 23 Oct 2020 20:47:04 +0800
Subject: [PATCH] gnu: Add bash-ctypes

* gnu/packages/bash.scm(bash-ctypes): New variable.
---
gnu/packages/bash.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 47ca625d9a..f9185ac519 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,10 +27,14 @@
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages bison)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages libffi)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages guile)
#:use-module (guix packages)
#:use-module (guix download)
@@ -415,3 +420,31 @@ framework for Bash. It provides a simple way to verify that the UNIX programs
you write behave as expected. Bats is most useful when testing software written
in Bash, but you can use it to test any UNIX program.")
(license expat)))
+
+(define-public bash-ctypes
+ (package
+ (name "bash-ctypes")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/taviso/ctypes.sh/releases/download/"
+ version "/ctypes-sh-" version ".tar.gz"))
+ (sha256
+ (base32 "0s1sifqzqmr0dnciv06yqrpzgj11d7n0gy5zaxh6b3x8bx7k75l8"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("elfutils" ,elfutils)
+ ("libelf" ,libelf)
+ ("libffi" ,libffi)
+ ("zlib" ,zlib)
+ ;; Require a bash with C plugin support to build.
+ ("bash" ,bash)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/taviso/ctypes.sh")
+ (synopsis "FFI for Bash")
+ (description "Bash-ctypes is a bash plugin that provides a foreign function
+interface directly in your shell. In other words, it allows you to call routines
+in shared libraries from within bash.")
+ (license expat)))
--
2.28.0
--
Retrieve my public GPG key: https://meta.sr.ht/~citreu.pgp

Zihao
Z
Z
Zhu Zihao wrote on 23 Oct 2020 17:39
(address . 44176@debbugs.gnu.org)
861rhpdk9w.fsf@163.com
Add missing v in download url
-----BEGIN PGP SIGNATURE-----

iQFJBAEBCAAzFiEE7NCVzXX6efyusptG1SOVn+xGFqYFAl+S+RsVHGFsbF9idXRf
bGFzdEAxNjMuY29tAAoJENUjlZ/sRham7rQH/3KC4mAkm1oBnwlVzx5R2fIecZww
kYFvUPok2n6KVPuzj7+ZeVLRgDVuJwMu/gMzJUyrrcG76l6nWZ9d3/hLJxLjZ5F/
+pk67j88Cf5d/8aHNT3dFlBGsjNAPK7TICQyKzL/P3JPhYRwwMnDYL64tGkGEhxt
1qK+A/S3wOEEpDdDozSZ5xFBw8UAja/gff218qEVR0jHGWUCp4FxaE9q4BUU3zyx
cWyVfTsoabKzUmhOiz0Qa1T/z4GK3qOii+q46QUVfkl005t6neFceVqtzt86TkWV
9IEGCmxGgYIrEGkhU9ehZ+4A46Gm6PdLSeODHWoYeJqHjhMy+Y5Y1vhiK7s=
=yIuH
-----END PGP SIGNATURE-----

From 8210f5f95ca4f33dce35ed0c9bb20c8f615ab079 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 23 Oct 2020 20:47:04 +0800
Subject: [PATCH] gnu: Add bash-ctypes

* gnu/packages/bash.scm(bash-ctypes): New variable.
---
gnu/packages/bash.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 47ca625d9a..f7d3cd2892 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,10 +27,14 @@
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages bison)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages libffi)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages guile)
#:use-module (guix packages)
#:use-module (guix download)
@@ -415,3 +420,31 @@ framework for Bash. It provides a simple way to verify that the UNIX programs
you write behave as expected. Bats is most useful when testing software written
in Bash, but you can use it to test any UNIX program.")
(license expat)))
+
+(define-public bash-ctypes
+ (package
+ (name "bash-ctypes")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/taviso/ctypes.sh/releases/download/v"
+ version "/ctypes-sh-" version ".tar.gz"))
+ (sha256
+ (base32 "0s1sifqzqmr0dnciv06yqrpzgj11d7n0gy5zaxh6b3x8bx7k75l8"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("elfutils" ,elfutils)
+ ("libelf" ,libelf)
+ ("libffi" ,libffi)
+ ("zlib" ,zlib)
+ ;; Require a bash with C plugin support to build.
+ ("bash" ,bash)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/taviso/ctypes.sh")
+ (synopsis "FFI for Bash")
+ (description "Bash-ctypes is a bash plugin that provides a foreign function
+interface directly in your shell. In other words, it allows you to call routines
+in shared libraries from within bash.")
+ (license expat)))
--
2.28.0
--
Retrieve my public GPG key: https://meta.sr.ht/~citreu.pgp

Zihao
Z
Z
Zhu Zihao wrote on 23 Oct 2020 17:49
(address . 44176@debbugs.gnu.org)
86mu0dc585.fsf@163.com
Push another commit to fix import conflict of name "zlib"
-----BEGIN PGP SIGNATURE-----

iQFJBAEBCAAzFiEE7NCVzXX6efyusptG1SOVn+xGFqYFAl+S+4oVHGFsbF9idXRf
bGFzdEAxNjMuY29tAAoJENUjlZ/sRham9D4IAKiL2ws+TyQ9MClSp2E8lj0zKy3w
MvnsbhZcxeYhNuF7DuOOI2E9nlQAjCx+h6p5cV2vaTvtATebjDA8esvIv4XcHkld
UNTejgeg7MxQ177AebrGVTCCtO74QEjWkkoxLJF+xUuBDdXAxPjotCMW23/90PSt
aXRfAL+vF/AlO4R85e98O7e0gMFkKLKIldxmWvLk5oZsZZEMRUcvPtyex6ftDvGo
ip6O80QhbRQgMxc27Z3oROZblWXj3wIthDoYPyfnqP9t45cXxI4OjxE8aEjGkIBv
Zm3p+mp2CWP+ciC+yRhOLjLDWR885EfoRXGLeS+OSeFaqtgrhYNTyDpR0AA=
=UyhT
-----END PGP SIGNATURE-----

From 8210f5f95ca4f33dce35ed0c9bb20c8f615ab079 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 23 Oct 2020 20:47:04 +0800
Subject: [PATCH 1/2] gnu: Add bash-ctypes

* gnu/packages/bash.scm(bash-ctypes): New variable.
---
gnu/packages/bash.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 47ca625d9a..f7d3cd2892 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,10 +27,14 @@
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages bison)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages libffi)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages guile)
#:use-module (guix packages)
#:use-module (guix download)
@@ -415,3 +420,31 @@ framework for Bash. It provides a simple way to verify that the UNIX programs
you write behave as expected. Bats is most useful when testing software written
in Bash, but you can use it to test any UNIX program.")
(license expat)))
+
+(define-public bash-ctypes
+ (package
+ (name "bash-ctypes")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/taviso/ctypes.sh/releases/download/v"
+ version "/ctypes-sh-" version ".tar.gz"))
+ (sha256
+ (base32 "0s1sifqzqmr0dnciv06yqrpzgj11d7n0gy5zaxh6b3x8bx7k75l8"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("elfutils" ,elfutils)
+ ("libelf" ,libelf)
+ ("libffi" ,libffi)
+ ("zlib" ,zlib)
+ ;; Require a bash with C plugin support to build.
+ ("bash" ,bash)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/taviso/ctypes.sh")
+ (synopsis "FFI for Bash")
+ (description "Bash-ctypes is a bash plugin that provides a foreign function
+interface directly in your shell. In other words, it allows you to call routines
+in shared libraries from within bash.")
+ (license expat)))
--
2.28.0
From 663104a3945696323d893443a3ab0c96c17e07e3 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 23 Oct 2020 23:43:05 +0800
Subject: [PATCH 2/2] gnu: Use prefix "license:" to import (guix licenses)

* gnu/packages/bash.scm
(bash, bash-completion, bash-tap, bats, bash-ctypes)[license]:

Rename with prefix "license:".
---
gnu/packages/bash.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

Toggle diff (57 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index f7d3cd2892..59f6e7fc69 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -23,7 +23,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages bash)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
@@ -215,7 +215,7 @@ from the Korn Shell and the C Shell and new improvements of its own. It
allows command-line editing, unlimited command history, shell functions and
aliases, and job control while still allowing most sh scripts to be run
without modification.")
- (license gpl3+)
+ (license license:gpl3+)
(home-page "https://www.gnu.org/software/bash/"))))
(define-public bash-minimal
@@ -325,7 +325,7 @@ without modification.")
"This package provides extensions that allow Bash to provide adapted
completion for many common commands.")
(home-page "https://github.com/scop/bash-completion")
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public bash-tap
(package
@@ -369,7 +369,7 @@ test library")
for Bash shell scripts and functions. Along with the Test::More-style testing
helpers it provides helper functions for mocking commands and in-process output
capturing.")
- (license expat)))
+ (license license:expat)))
(define-public bats
(package
@@ -419,7 +419,7 @@ capturing.")
framework for Bash. It provides a simple way to verify that the UNIX programs
you write behave as expected. Bats is most useful when testing software written
in Bash, but you can use it to test any UNIX program.")
- (license expat)))
+ (license license:expat)))
(define-public bash-ctypes
(package
@@ -447,4 +447,4 @@ in Bash, but you can use it to test any UNIX program.")
(description "Bash-ctypes is a bash plugin that provides a foreign function
interface directly in your shell. In other words, it allows you to call routines
in shared libraries from within bash.")
- (license expat)))
+ (license license:expat)))
--
2.28.0
--
Retrieve my public GPG key: https://meta.sr.ht/~citreu.pgp

Zihao
D
D
david larsson wrote on 24 Oct 2020 09:22
Re: [bug#44176] Acknowledgement (gnu: Add bash-ctypes)
(name . Zhu Zihao)(address . all_but_last@163.com)
e48d3a8254408ee9f439e1dbff66233f@selfhosted.xyz
On 2020-10-23 15:49, Zhu Zihao wrote:
Toggle quote (2 lines)
> Push another commit to fix import conflict of name "zlib"

Thanks for adding this package!

Though, if you'd rather add a git-fetch version of it, which I think is
generally preferred over a url-fetch of a tarball so you can more easily
inherit the package and just update the commit, you could perhaps edit
from this old version:


Best regards,
David
Z
Z
Zhu Zihao wrote on 24 Oct 2020 12:12
(name . david larsson)(address . david.larsson@selfhosted.xyz)
86imb0c4pw.fsf@163.com
The git version lacks configure script, so we have to generate it first.
That means we need to add autoconf, automake and libtool to
native-inputs.

And IIUC Guix's distributing strategy is distribute a release rather
than rolling on Git. Do you think it's worth to change to git-fetch?

I move bash from inputs to native-inputs because we just need it for
test.
-----BEGIN PGP SIGNATURE-----

iQFJBAEBCAAzFiEE7NCVzXX6efyusptG1SOVn+xGFqYFAl+T/hsVHGFsbF9idXRf
bGFzdEAxNjMuY29tAAoJENUjlZ/sRhamVQ0IAL+s68gHXcmBrLDjxgvC4yaqyOmv
fpYSR7D04iI6NySztusM/1dHwBWcpc/42UGVk5Sug2L7K7AwEBrpVE8P+Iop22yH
bObMRfBdLzjRkAX6UDGsg5GhrRgkK+Rnq014+oqxunqpyPmEOkXhW6umtxV2ifM4
F8GjeDVcckcLPu/Kx8umFPtYO1wr58VcwUon2d24HmdcubGxNSd9W9L8JTxEuATy
ncf8ofe3+LYb3ilMDO3nGROhciiemUTSKmobZFmaiYWVeP3p3c0sA/lR0Tq+gQ3z
Fn2jU0Od5JBd0j6EpZEAdAPkqGaPNRvfbkaPgdWvO4SU1jDE9ZGuGWEbuRs=
=pOJz
-----END PGP SIGNATURE-----

From 8210f5f95ca4f33dce35ed0c9bb20c8f615ab079 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 23 Oct 2020 20:47:04 +0800
Subject: [PATCH 1/2] gnu: Add bash-ctypes

* gnu/packages/bash.scm(bash-ctypes): New variable.
---
gnu/packages/bash.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 47ca625d9a..f7d3cd2892 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,10 +27,14 @@
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages readline)
#:use-module (gnu packages bison)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages libffi)
+ #:use-module (gnu packages pkg-config)
#:use-module (gnu packages guile)
#:use-module (guix packages)
#:use-module (guix download)
@@ -415,3 +420,31 @@ framework for Bash. It provides a simple way to verify that the UNIX programs
you write behave as expected. Bats is most useful when testing software written
in Bash, but you can use it to test any UNIX program.")
(license expat)))
+
+(define-public bash-ctypes
+ (package
+ (name "bash-ctypes")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/taviso/ctypes.sh/releases/download/v"
+ version "/ctypes-sh-" version ".tar.gz"))
+ (sha256
+ (base32 "0s1sifqzqmr0dnciv06yqrpzgj11d7n0gy5zaxh6b3x8bx7k75l8"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("elfutils" ,elfutils)
+ ("libelf" ,libelf)
+ ("libffi" ,libffi)
+ ("zlib" ,zlib)
+ ;; Require a bash with C plugin support to build.
+ ("bash" ,bash)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://github.com/taviso/ctypes.sh")
+ (synopsis "FFI for Bash")
+ (description "Bash-ctypes is a bash plugin that provides a foreign function
+interface directly in your shell. In other words, it allows you to call routines
+in shared libraries from within bash.")
+ (license expat)))
--
2.28.0
From 663104a3945696323d893443a3ab0c96c17e07e3 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 23 Oct 2020 23:43:05 +0800
Subject: [PATCH 2/2] gnu: Use prefix "license:" to import (guix licenses)

* gnu/packages/bash.scm
(bash, bash-completion, bash-tap, bats, bash-ctypes)[license]:

Rename with prefix "license:".
---
gnu/packages/bash.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

Toggle diff (57 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index f7d3cd2892..59f6e7fc69 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -23,7 +23,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages bash)
- #:use-module (guix licenses)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
@@ -215,7 +215,7 @@ from the Korn Shell and the C Shell and new improvements of its own. It
allows command-line editing, unlimited command history, shell functions and
aliases, and job control while still allowing most sh scripts to be run
without modification.")
- (license gpl3+)
+ (license license:gpl3+)
(home-page "https://www.gnu.org/software/bash/"))))
(define-public bash-minimal
@@ -325,7 +325,7 @@ without modification.")
"This package provides extensions that allow Bash to provide adapted
completion for many common commands.")
(home-page "https://github.com/scop/bash-completion")
- (license gpl2+)))
+ (license license:gpl2+)))
(define-public bash-tap
(package
@@ -369,7 +369,7 @@ test library")
for Bash shell scripts and functions. Along with the Test::More-style testing
helpers it provides helper functions for mocking commands and in-process output
capturing.")
- (license expat)))
+ (license license:expat)))
(define-public bats
(package
@@ -419,7 +419,7 @@ capturing.")
framework for Bash. It provides a simple way to verify that the UNIX programs
you write behave as expected. Bats is most useful when testing software written
in Bash, but you can use it to test any UNIX program.")
- (license expat)))
+ (license license:expat)))
(define-public bash-ctypes
(package
@@ -447,4 +447,4 @@ in Bash, but you can use it to test any UNIX program.")
(description "Bash-ctypes is a bash plugin that provides a foreign function
interface directly in your shell. In other words, it allows you to call routines
in shared libraries from within bash.")
- (license expat)))
+ (license license:expat)))
--
2.28.0
david larsson writes:

Toggle quote (16 lines)
> On 2020-10-23 15:49, Zhu Zihao wrote:
>> Push another commit to fix import conflict of name "zlib"
>
> Thanks for adding this package!
>
> Though, if you'd rather add a git-fetch version of it, which I think is
> generally preferred over a url-fetch of a tarball so you can more easily
> inherit the package and just update the commit, you could perhaps edit from this
> old version:
>
> https://gitlab.com/methuselah-0/bash-coding-utils.sh/-/blob/master/guix-channel/bash-coding-utils.scm#L81
>
> Best regards,
> David


--
Retrieve my PGP public key: https://meta.sr.ht/~citreu.pgp

Zihao
L
L
Ludovic Courtès wrote on 26 Oct 2020 22:27
(name . Zhu Zihao)(address . all_but_last@163.com)
87mu08ad9d.fsf@gnu.org
Hi,

Zhu Zihao <all_but_last@163.com> skribis:

Toggle quote (7 lines)
> The git version lacks configure script, so we have to generate it first.
> That means we need to add autoconf, automake and libtool to
> native-inputs.
>
> And IIUC Guix's distributing strategy is distribute a release rather
> than rolling on Git. Do you think it's worth to change to git-fetch?

For Autotools-based project, we build from “make dist” tarballs like you
did, so I think it’s fine (we should discuss changing that in the
future.)

Toggle quote (7 lines)
>>From 8210f5f95ca4f33dce35ed0c9bb20c8f615ab079 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Fri, 23 Oct 2020 20:47:04 +0800
> Subject: [PATCH 1/2] gnu: Add bash-ctypes
>
> * gnu/packages/bash.scm(bash-ctypes): New variable.

[...]

Toggle quote (10 lines)
>>From 663104a3945696323d893443a3ab0c96c17e07e3 Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Fri, 23 Oct 2020 23:43:05 +0800
> Subject: [PATCH 2/2] gnu: Use prefix "license:" to import (guix licenses)
>
> * gnu/packages/bash.scm
> (bash, bash-completion, bash-tap, bats, bash-ctypes)[license]:
>
> Rename with prefix "license:".

I tweaked the synopsis/description and applied both.

Thanks!

Ludo’.
Closed
?