Message ID | 20220914030706.47516-1-kiasoc5@disroot.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#57659,v3] gnu: Add blesh. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
kiasoc5 <kiasoc5@disroot.org> writes: > Tests pass now. > > * gnu/packages/bash.scm (blesh): New variable. > --- > gnu/packages/bash.scm | 45 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 45 insertions(+) Thanks. I've tweaked the name of one of the phaess (use-LANG-for-tests rather than use-LC_ALL-for-tests) as that seemed more correct. I also removed some inputs that were redundant (coreutils is provided by the gnu-build-system, so is an implicit input), and git-minimal didn't seem to be required. I pushed to master as 592ca01d8d25849d077035d54d969d90ed5c2609. Thanks, Chris
On 14-09-2022 10:40, Christopher Baines wrote: > > kiasoc5 <kiasoc5@disroot.org> writes: > >> Tests pass now. >> >> * gnu/packages/bash.scm (blesh): New variable. >> --- >> gnu/packages/bash.scm | 45 +++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 45 insertions(+) > > Thanks. I've tweaked the name of one of the phaess (use-LANG-for-tests > rather than use-LC_ALL-for-tests) as that seemed more correct. I also > removed some inputs that were redundant (coreutils is provided by the > gnu-build-system, so is an implicit input), and git-minimal didn't seem > to be required. gnu-build-system only provides a _natively compiled_ coreutils (for --system), not a cross-compiled coreutils (for --target). As such, it is not redundant (unless it compile-time only (*), the build system isn't clear to me). >+ (add-after 'unpack 'make-readlink-work >+ (lambda _ >+ (substitute* "ble.pp" >+ (("PATH=/bin:/usr/bin readlink") >+ (search-input-file %build-inputs >+ "/bin/readlink"))))) You're mixing G-exp (new) and %build-inputs (old). How about (search-input-file inputs "bin/readlink") or (which "readlink") (depending on whether inputs or native-inputs is appropriate) instead? Greetings, Maxime. (*) can be verified by using "guix gc --references".
On Thu, Sep 15 2022, 05:26:30 PM +0200 Maxime Devos <maximedevos@telenet.be> wrote: > On 14-09-2022 10:40, Christopher Baines wrote: > > > > kiasoc5 <kiasoc5@disroot.org> writes: > > > >> Tests pass now. > >> > >> * gnu/packages/bash.scm (blesh): New variable. > >> --- > >> gnu/packages/bash.scm | 45 > >> +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 > >> insertions(+) > > > > Thanks. I've tweaked the name of one of the phaess > > (use-LANG-for-tests rather than use-LC_ALL-for-tests) as that > > seemed more correct. I also removed some inputs that were redundant > > (coreutils is provided by the gnu-build-system, so is an implicit > > input), and git-minimal didn't seem to be required. > > gnu-build-system only provides a _natively compiled_ coreutils (for > --system), not a cross-compiled coreutils (for --target). As such, > it is not redundant (unless it compile-time only (*), the build > system isn't clear to me). Readlink should be required for runtime, how about substituting "PATH=/bin:/usr/bin readlink" -> "readlink" instead of the path to readlink? > >+ (add-after 'unpack 'make-readlink-work > >+ (lambda _ > >+ (substitute* "ble.pp" > >+ (("PATH=/bin:/usr/bin readlink") > >+ (search-input-file %build-inputs > >+ > >"/bin/readlink"))))) > > You're mixing G-exp (new) and %build-inputs (old). How about > (search-input-file inputs "bin/readlink") or (which "readlink") > (depending on whether inputs or native-inputs is appropriate) instead? If we keep coreutils as an input then it would be search-file-inputs. --
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 72758560cd..8f614e145a 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -37,6 +37,8 @@ (define-module (gnu packages bash) #:use-module (gnu packages libffi) #:use-module (gnu packages pkg-config) #:use-module (gnu packages guile) + #:use-module (gnu packages version-control) + #:use-module (gnu packages less) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -456,3 +458,46 @@ (define-public bash-ctypes function interface (FFI) directly in your shell. In other words, it allows you to call routines in shared libraries from within Bash.") (license license:expat))) + +(define-public blesh + (package + (name "blesh") + (version "0.4.0-devel2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/akinomyoga/ble.sh") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "02fdjyh4x6wr5hg3i86nsxhz8ysgjrvvxdmk6pqr0lm8ngw9p3sh")))) + (arguments + (list #:make-flags #~(list (string-append "PREFIX=" + #$output)) + #:phases #~(modify-phases %standard-phasesg + (add-after 'unpack 'pretend-contrib-.git-exists + (lambda _ + (mkdir-p "contrib/.git"))) + (add-after 'unpack 'make-readlink-work + (lambda _ + (substitute* "ble.pp" + (("PATH=/bin:/usr/bin readlink") + (search-input-file %build-inputs + "/bin/readlink"))))) + (delete 'configure) ;no configure + (add-before 'check 'use-LC_ALL-for-tests + (lambda _ + (setenv "LANG" + (getenv "LC_ALL")) + (unsetenv "LC_ALL")))))) + (build-system gnu-build-system) + (inputs (list coreutils)) + (native-inputs (list git-minimal less)) + (home-page "https://github.com/akinomyoga/ble.sh") + (synopsis "Bash Line Editor") + (description + "Bash Line Editor (ble.sh) is a command line editor written in pure Bash +which replaces the default GNU Readline. It adds syntax highlighting, auto +suggestions, vim modes, and more to Bash interactive sessions.") + (license license:bsd-3)))