From aa73b41acb81c13a35d0afd272a44abe1a29c708 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Fri, 23 Oct 2020 20:47:04 +0800 Subject: gnu: Add bash-ctypes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/bash.scm (bash-ctypes): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/bash.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'gnu/packages/bash.scm') diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 47ca625d9a..2d751147fa 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2019 Mathieu Othacehe +;;; Copyright © 2020 Zhu Zihao ;;; ;;; 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 "Foreign function interface for Bash") + (description "Bash-ctypes is a Bash plugin that provides a foreign +function interface (FFI) directly in your shell. In other words, it allows +you to call routines in shared libraries from within Bash.") + (license expat))) -- cgit v1.2.3 From 0be00efff5d5e138c356464060fc47b7a5c47e28 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Fri, 23 Oct 2020 23:43:05 +0800 Subject: gnu: Use prefix "license:" to import (guix licenses) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/bash.scm (bash, bash-completion, bash-tap, bats, bash-ctypes)[license]: Rename with prefix "license:". Signed-off-by: Ludovic Courtès --- gnu/packages/bash.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gnu/packages/bash.scm') diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 2d751147fa..ed2931fd97 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -23,7 +23,7 @@ ;;; along with GNU Guix. If not, see . (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 (FFI) directly in your shell. In other words, it allows you to call routines in shared libraries from within Bash.") - (license expat))) + (license license:expat))) -- cgit v1.2.3