projects/guix·blob librewolf-updates · refs

584 lines · 24.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012-2017, 2019-2020, 2022, 2023 Ludovic Courtès <[email protected]>
3;;; Copyright © 2014, 2015, 2018 Mark H Weaver <[email protected]>
4;;; Copyright © 2015, 2017 Leo Famulari <[email protected]>
5;;; Copyright © 2016, 2017, 2018, 2019, 2022 Efraim Flashner <[email protected]>
6;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <[email protected]>
7;;; Copyright © 2019 Mathieu Othacehe <[email protected]>
8;;; Copyright © 2020 Zhu Zihao <[email protected]>
9;;; Copyright © 2021 Marius Bakke <[email protected]>
10;;; Copyright © 2024 Oleg Pykhalov <[email protected]>
11;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
12;;; Copyright © 2024 chris <[email protected]>
13;;; Copyright © 2025 Maxim Cournoyer <[email protected]>
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages bash)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages bootstrap)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages elf)
38 #:use-module (gnu packages ncurses)
39 #:use-module (gnu packages readline)
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages libffi)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages guile)
45 #:use-module (gnu packages version-control)
46 #:use-module (gnu packages less)
47 #:use-module (guix packages)
48 #:use-module (guix download)
49 #:use-module (guix git-download)
50 #:use-module (guix utils)
51 #:use-module (guix gexp)
52 #:use-module (guix monads)
53 #:use-module (guix store)
54 #:use-module (guix build-system copy)
55 #:use-module (guix build-system gnu)
56 #:use-module (guix build-system trivial)
57 #:autoload (guix gnupg) (gnupg-verify*)
58 #:autoload (guix base32) (bytevector->nix-base32-string)
59
60 ;; See <https://bugs.gnu.org/41457> for why not #:autoload here.
61 #:use-module ((gcrypt hash) #:select (port-sha256))
62
63 #:use-module (srfi srfi-1)
64 #:use-module (srfi srfi-26)
65 #:use-module (ice-9 format))
66
67(define (patch-url seqno)
68 "Return the URL of Bash patch number SEQNO."
69 (format #f "mirror://gnu/bash/bash-5.2-patches/bash52-~3,'0d" seqno))
70
71(define (bash-patch seqno sha256-bv)
72 "Return the origin of Bash patch SEQNO, with expected hash SHA256-BV."
73 (origin
74 (method url-fetch)
75 (uri (patch-url seqno))
76 (sha256 sha256-bv)))
77
78(define-syntax-rule (patch-series (seqno hash) ...)
79 (list (bash-patch seqno (base32 hash))
80 ...))
81
82(define %patch-series-5.2
83 ;; This is the current patches series for 5.2, generated using
84 ;; 'download-patches' below.
85 (patch-series
86 (1 "02iibpd3jq8p1bhdzgik8ps6gi1145vr463a82gj1hivjbp2ybzl")
87 (2 "1f6p1z85qh1lavdp3xikgp0bfv0vqhvgpgwmdzlywl35hwdmxk25")
88 (3 "1zxsi869jd90hksx3nyypgyqwrxhw2ws3r6hmk76yc1lsgdhq2ba")
89 (4 "04i5liw5cg6dqkdxfgazqc2jrw40bmclx3dx45bwy259pcj7g0iq")
90 (5 "0mykflv9qnbx3jz71l4f7isadiw9knm4qimqkwsv9cv88dafpq7c")
91 (6 "13265akl8w6zyrg0l7f0x6arjgqjhllcwl6lk46rl53x4mm5dq6i")
92 (7 "146lrwkn5wgxzs6vx34wl47g69zsxdy032k40qzi626b47ya6015")
93 (8 "1s5i8hcayrv25lc8fxcr431v634yx5sii53b8fmip789s0pxjjvb")
94 (9 "1kfk25151ka9wkmk1myf12irgcmvhsd8b0nfifvhrszah9w82npr")
95 (10 "1kf1jrwm30js0v3d1r2rk4x09s1pyjp70wnd1qqhf9bmkw15ww67")
96 (11 "1x5nkvbj6hci7gx42q7qa72hg2a9wwxh85dk79gn521ypwjmy6w3")
97 (12 "0b6lcwzm7v5bzjiwaz2c8n5aj77w8ckhp2vwk4v3zsdq3z70gc9g")
98 (13 "1rkwpibd6j2ghppfhqsva2jm4kdni6b7jpdsxdps52643gc4yjq9")
99 (14 "09766vqqw4ffnmysm725v35qkhp1g9j4qgqag941xvq655pj9y9y")
100 (15 "12im449abnq5gaqjmdxr5i38kmp02fa8l8wffad3jryvd58r0wzg")
101 (16 "05arb0hzmng03cr357lf6p8af0x2a1pznsd3psll03nibfy56n0m")
102 (17 "129cvx4gfz8n23iw1lhbknbw86fyw6vh60jqj1wj3d5pr75wwj0w")
103 (18 "105am94qxjc27gga4a8asvsi01090xwjfim3s16lafwjvm4xsha6")
104 (19 "10njgv5mrc5rhsp5lvxcbm0pnzn59a8spi2nhdasifyl1a32cp1j")
105 (20 "07f0wlmqjdfarp44w3gj9gdqbqm5x20rvlhpn34ngklmxcm2bz5n")
106 (21 "1kahfqqalcwi4m73pg3ssz6lh0kcqsqax09myac7a15d2y0vhd43")
107 (22 "0w74aym0g1fh48864a3qxh89f26iaq7wsbg7244c6kjr94527dbq")
108 (23 "1lywjqbc36j5pdzfcvnz1zy30j76aqmsm190p888av0hw815b45g")
109 (24 "1hq23djqbr7s9y2324jq9mxr5bwdkmgizn3zgpchbsqp054k85cp")
110 (25 "0x9hc4silzl4d3zw4p43i5dm7w86k50j47f87lracwfgwy3z8f2i")
111 (26 "1b1fhm1dsi67r8ip17s0xvx2qq31fsxc1g9n3r931dd0k9a1zvln")
112 (27 "0fdbhvs9dkf4knncifh98a76q4gylhyvfrffq5p9q3ag5q58jap1")
113 (28 "1hdacd6sssjshmry1sscdnxxfb2r51bvdyghlfjaqgc9l85phhk0")
114 (29 "11wrlb20w6v89b96krg0gwxipwhvrda6rq1y9f972m32gsrsqp0j")
115 (30 "13v9fqgim082dmvkslsr0hs793yzhsij2s91mjswsfhj1qip7zy3")
116 (31 "15d7rddj6spwc1fy997lxx6zvzq0zbxgf2h20mhi4wgp5nzbglf2")
117 (32 "05ia6yf32hjprmyyxqawhgckxs3684ikfx8xg08zfgx9xkd7g73v")
118 (33 "1qm2aad9mf2xah6xwchga7s5pk3v308mrv9lgh50d65d236ccgh1")
119 (34 "0bi38dhkkwpm2qrzp8zpykglq6gibvv2n9f8m59gwj406cxvp7w9")
120 (35 "1r8k34y82v02yfkgws17j7i53ybb74dqnwl2jjiv0av9z93hl6l2")
121 (36 "0mwhr9hfbh2czf8klbxg6nbd2g9xl9kygvgk061vird56r4kzj8m")
122 (37 "156sbi3srzkyxajkmhb7iigq0j4nvwnpsbw88xdsxn95a4xiqb4a")))
123
124(define (download-patches store count)
125 "Download COUNT Bash patches into store. Return a list of
126number/base32-hash tuples, directly usable in the 'patch-series' form."
127 (unfold (cut > <> count)
128 (lambda (number)
129 (let* ((patch (download-to-store store (patch-url number)))
130 (sig (download-to-store store
131 (string-append (patch-url number)
132 ".sig"))))
133 (unless (eq? 'valid-signature (gnupg-verify* sig patch))
134 (error "failed to verify signature" patch))
135
136 (list number
137 (bytevector->nix-base32-string
138 (call-with-input-file patch port-sha256)))))
139 1+
140 1))
141
142(define-public bash
143 (let* ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'"
144 "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'"
145 "-DNON_INTERACTIVE_LOGIN_SHELLS"
146 "-DSSH_SOURCE_BASHRC"
147 "-DSYS_BASHRC='\"/etc/bashrc\"'")
148 " "))
149 (configure-flags
150 ``("--without-bash-malloc"
151 "--with-installed-readline"
152 ,,(string-append "CPPFLAGS=" cppflags)
153 ,(string-append
154 "LDFLAGS=-Wl,-rpath -Wl,"
155 (assoc-ref %build-inputs "readline")
156 "/lib"
157 " -Wl,-rpath -Wl,"
158 (assoc-ref %build-inputs "ncurses")
159 "/lib")))
160 (version "5.2"))
161 (package
162 (name "bash")
163 (source (origin
164 (method url-fetch)
165 (uri (string-append
166 "mirror://gnu/bash/bash-" version ".tar.gz"))
167 (sha256
168 (base32
169 "1yrjmf0mqg2q8pqphjlark0mcmgf88b0acq7bqf4gx3zvxkc2fd1"))
170 (patch-flags '("-p0"))
171 (patches (cons (search-patch "bash-linux-pgrp-pipe.patch")
172 %patch-series-5.2))))
173 (version (string-append version "." (number->string (length %patch-series-5.2))))
174 (build-system gnu-build-system)
175
176 (outputs '("out"
177 "doc" ;1.7 MiB of HTML and extra files
178 "include")) ;headers used by extensions
179 (native-inputs (if (target-loongarch64?)
180 (list config)
181 '()))
182 (inputs (list readline ncurses)) ;TODO: add texinfo
183 (arguments
184 `( ;; When cross-compiling, `configure' incorrectly guesses that job
185 ;; control is missing.
186 #:configure-flags ,(if (%current-target-system)
187 `(cons* "bash_cv_job_control_missing=no"
188 ,configure-flags)
189 configure-flags)
190
191 ;; Bash is reportedly not parallel-safe. See, for instance,
192 ;; <http://patches.openembedded.org/patch/32745/> and
193 ;; <http://git.buildroot.net/buildroot/commit/?h=79e2d802a>.
194 #:parallel-build? #f
195 #:parallel-tests? #f
196
197 ;; XXX: The tests have a lot of hard-coded paths, so disable them
198 ;; for now.
199 #:tests? #f
200
201 #:modules ((srfi srfi-26)
202 (guix build utils)
203 (guix build gnu-build-system))
204
205 #:phases
206 (modify-phases %standard-phases
207 ,@(if (and (target-hurd?) (not (system-hurd?)))
208 `((add-after 'configure 'create-pipesize.h
209 ;; The Bash Makefile mentions how PIPESIZE calculation is
210 ;; "technically wrong" when cross-compiling, and offers no
211 ;; way to override it. On the 64bit Hurd, it can make
212 ;; bash hang.
213 (lambda _
214 (with-directory-excursion "builtins"
215 (with-output-to-file "psize.aux"
216 (lambda _ (display "dummy to pacify make\n")))
217 (with-output-to-file "pipesize.h"
218 (lambda _ (display "#define PIPESIZE 16384\n")))))))
219 '())
220
221 (add-after 'install 'install-sh-symlink
222 (lambda* (#:key outputs #:allow-other-keys)
223 ;; Add a `sh' -> `bash' link.
224 (let ((out (assoc-ref outputs "out")))
225 (with-directory-excursion (string-append out "/bin")
226 (symlink "bash" "sh")
227 #t))))
228
229 (add-after 'install 'move-development-files
230 (lambda* (#:key outputs #:allow-other-keys)
231 ;; Move 'Makefile.inc' and 'bash.pc' to "include" to avoid
232 ;; circular references among the outputs.
233 (let ((out (assoc-ref outputs "out"))
234 (include (assoc-ref outputs "include"))
235 (lib (cut string-append <> "/lib/bash")))
236 (mkdir-p (lib include))
237 (rename-file (string-append (lib out)
238 "/Makefile.inc")
239 (string-append (lib include)
240 "/Makefile.inc"))
241 (rename-file (string-append out "/lib/pkgconfig")
242 (string-append include
243 "/lib/pkgconfig"))
244
245 ;; Don't capture the absolute file name of 'install' to avoid
246 ;; retaining a dependency on Coreutils.
247 (substitute* (string-append (lib include)
248 "/Makefile.inc")
249 (("^INSTALL =.*")
250 "INSTALL = install -c\n"))
251 #t)))
252 ,@(if (target-loongarch64?)
253 `((add-after 'unpack 'update-config-scripts
254 (lambda* (#:key inputs native-inputs #:allow-other-keys)
255 ;; Replace outdated config.guess and config.sub.
256 (for-each (lambda (file)
257 (install-file
258 (search-input-file
259 (or native-inputs inputs)
260 (string-append "/bin/" file)) "./support"))
261 '("config.guess" "config.sub")))))
262 '()))))
263
264 (native-search-paths
265 (list (search-path-specification ;new in 4.4
266 (variable "BASH_LOADABLES_PATH")
267 (files '("lib/bash")))))
268
269 (synopsis "The GNU Bourne-Again SHell")
270 (description
271 "Bash is the shell, or command-line interpreter, of the GNU system. It
272is compatible with the Bourne Shell, but it also integrates useful features
273from the Korn Shell and the C Shell and new improvements of its own. It
274allows command-line editing, unlimited command history, shell functions and
275aliases, and job control while still allowing most sh scripts to be run
276without modification.")
277 (license license:gpl3+)
278 (home-page "https://www.gnu.org/software/bash/"))))
279
280(define-public bash-minimal
281 ;; A stripped-down Bash for non-interactive use.
282 (package/inherit bash
283 (name "bash-minimal")
284 (inputs '()) ; no readline, no curses
285
286 ;; No "include" output because there's no support for loadable modules.
287 (outputs (delete "include" (package-outputs bash)))
288
289 (arguments
290 (substitute-keyword-arguments (package-arguments bash)
291 ((#:modules _ '())
292 '((guix build gnu-build-system)
293 (guix build utils)
294 (srfi srfi-1)
295 (srfi srfi-26)))
296 ((#:configure-flags flags '())
297 `(list "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"
298 "--without-bash-malloc"
299 "--disable-readline"
300 "--disable-history"
301 "--disable-help-builtin"
302 "--disable-progcomp"
303 "--disable-net-redirections"
304 "--disable-nls"
305
306 ;; Pretend 'dlopen' is missing so we don't build loadable
307 ;; modules and related code.
308 "ac_cv_func_dlopen=no"
309
310 ,@(if (%current-target-system)
311 '("bash_cv_job_control_missing=no"
312 "bash_cv_getcwd_malloc=yes")
313 '())))
314 ((#:phases phases)
315 `(modify-phases ,phases
316 ;; No loadable modules.
317 (delete 'move-development-files)))))
318 (synopsis "The GNU Bourne-Again SHell, stripped down for non-interactive use")))
319
320(define-public static-bash
321 ;; Statically-linked Bash that contains nothing but the 'bash' binary and
322 ;; 'sh' symlink, without any reference.
323 (let ((bash (static-package bash-minimal)))
324 (package/inherit bash
325 (name "bash-static")
326 (arguments
327 (substitute-keyword-arguments
328 `(#:allowed-references ("out") ,@(package-arguments bash))
329 ((#:configure-flags flags '())
330 ;; XXX: when Update glibc from 2.40 to 2.41,
331 ;; need this flag to compile successfully.
332 ;; Otherwise, an error will be reported:
333 ;; multiple definition of `getenv'
334 (if (%current-target-system)
335 `(cons
336 "bash_cv_getenv_redef=no"
337 ,flags)
338 flags))
339 ((#:phases phases)
340 #~(modify-phases #$phases
341 (add-after 'strip 'remove-everything-but-the-binary
342 (lambda* (#:key outputs #:allow-other-keys)
343 (let* ((out (assoc-ref outputs "out"))
344 (bin (string-append out "/bin")))
345 (remove-store-references (string-append bin "/bash"))
346 (delete-file (string-append bin "/bashbug"))
347 (delete-file-recursively (string-append out "/share"))
348 #t))))))))))
349
350(define-public bash-with-syslog
351 (package/inherit bash
352 (name "bash-with-syslog")
353 (arguments
354 (substitute-keyword-arguments (package-arguments bash)
355 ((#:phases phases '%standard-phases)
356 `(modify-phases ,phases
357 (add-after 'unpack 'enable-syslogging
358 (lambda _
359 (substitute* "config-top.h"
360 (("/\\* #define SYSLOG_HISTORY \\*/")
361 "#define SYSLOG_HISTORY"))))))))
362 (description
363 "Bash is the shell, or command-line interpreter, of the GNU system. This
364variant logs the history to syslog.")))
365
366(define-public bash-completion
367 (package
368 (name "bash-completion")
369 (version "2.11")
370 (source (origin
371 (method url-fetch)
372 (uri (string-append
373 "https://github.com/scop/" name "/releases/download/"
374 version "/" name "-" version ".tar.xz"))
375 (sha256
376 (base32
377 "1b0iz7da1sgifx1a5wdyx1kxbzys53v0kyk8nhxfipllmm5qka3k"))
378 (patches
379 (search-patches "bash-completion-directories.patch"))))
380 (build-system gnu-build-system)
381 (arguments
382 `(#:tests? #f)) ; Unclear how to make tests pass.
383 (synopsis "Bash completions for common commands")
384 (description
385 "This package provides extensions that allow Bash to provide adapted
386completion for many common commands.")
387 (home-page "https://github.com/scop/bash-completion")
388 (license license:gpl2+)))
389
390(define-public bash-tap
391 (package
392 (name "bash-tap")
393 (version "1.0.2")
394 (source
395 (origin
396 (method git-fetch)
397 (uri (git-reference
398 (url "https://github.com/illusori/bash-tap")
399 (commit version)))
400 (file-name (git-file-name name version))
401 (sha256
402 (base32 "13zz9h6bhhnk3hiwhlpafrnf2isws249h3fz785dcgymk02arz9c"))))
403 ;; There is no compilation process to use this package, however, the bash
404 ;; scripts installed by this package start with "#!/bin/bash". To fix
405 ;; these lines, we use the patch-shebangs of the GNU build system. The
406 ;; project does not use a Makefile.
407 (build-system gnu-build-system)
408 (arguments
409 `(#:tests? #f ; There is no test suite.
410 #:phases
411 (modify-phases %standard-phases
412 ;; Because there are no configure scripts or Makefile, we can
413 ;; remove these phases.
414 (delete 'configure)
415 (delete 'build)
416 ;; The installation involves manually copying the files to a location.
417 ;; To make them easily accessible by setting PATH, we add the scripts
418 ;; to the "bin" folder.
419 (replace 'install
420 (lambda* (#:key outputs #:allow-other-keys)
421 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
422 (install-file "bash-tap" bin)
423 (install-file "bash-tap-bootstrap" bin)
424 (install-file "bash-tap-mock" bin)))))))
425 (home-page "https://www.illusori.co.uk/projects/bash-tap/")
426 (synopsis "Bash port of a Test::More/Test::Builder-style TAP-compliant
427test library")
428 (description "Bash TAP is a TAP-compliant Test::More-style testing library
429for Bash shell scripts and functions. Along with the Test::More-style testing
430helpers it provides helper functions for mocking commands and in-process output
431capturing.")
432 (license license:expat)))
433
434(define-public bats
435 (package
436 (name "bats")
437 (version "1.11.0")
438 (source (origin
439 (method git-fetch)
440 (uri (git-reference
441 (url "https://github.com/bats-core/bats-core")
442 (commit (string-append "v" version))))
443 (file-name (git-file-name name version))
444 (sha256
445 (base32
446 "1dmgxcqq87vs1l23hb7ghx319w2nvn0w8z2kdxggs2b8n22wi0c2"))))
447 (inputs
448 (list bash coreutils guile-3.0 ;for wrap-script
449 grep))
450 (arguments
451 `(#:modules ((guix build utils))
452 #:builder
453 (begin
454 (use-modules (guix build utils))
455 (copy-recursively (assoc-ref %build-inputs "source") ".")
456 (setenv "PATH"
457 (string-append (assoc-ref %build-inputs "bash") "/bin"
458 ":" (assoc-ref %build-inputs "coreutils") "/bin"
459 ":" (assoc-ref %build-inputs "grep") "/bin"
460 ":" (assoc-ref %build-inputs "guile") "/bin"
461 ":" (getenv "PATH")))
462 (for-each patch-shebang
463 (find-files "."
464 (lambda (file stat)
465 ;; Filter out symlinks.
466 (eq? 'regular (stat:type stat)))
467 #:stat lstat))
468 (substitute* "bin/bats"
469 (("export BATS_ROOT" line)
470 (string-append "BATS_ROOT=\"${BATS_ROOT:-" %output "/libexec/bats-core}\"\n"
471 line)))
472 ;; Install phase
473 (invoke "./install.sh" %output)
474 (wrap-script (string-append %output "/bin/bats")
475 #:guile (search-input-file %build-inputs "bin/guile")
476 (list "PATH" 'prefix (string-split (getenv "PATH")
477 #\:))))))
478 (build-system trivial-build-system)
479 (home-page "https://github.com/bats-core/bats-core/")
480 (synopsis "Bash Automated Testing System")
481 (description
482 "Bats is a @acronym{TAP, Test Anything Protocol}-compliant testing
483framework for Bash. It provides a simple way to verify that the UNIX programs
484you write behave as expected. Bats is most useful when testing software written
485in Bash, but you can use it to test any UNIX program.")
486 (license license:expat)))
487
488(define-public bash-ctypes
489 (package
490 (name "bash-ctypes")
491 (version "1.2")
492 (source
493 (origin
494 (method url-fetch)
495 (uri (string-append "https://github.com/taviso/ctypes.sh/releases/download/v"
496 version "/ctypes-sh-" version ".tar.gz"))
497 (sha256
498 (base32 "0s1sifqzqmr0dnciv06yqrpzgj11d7n0gy5zaxh6b3x8bx7k75l8"))))
499 (build-system gnu-build-system)
500 (inputs
501 (list elfutils
502 libelf
503 libffi
504 zlib
505 ;; Require a bash with C plugin support to build.
506 bash))
507 (native-inputs
508 (list pkg-config))
509 (home-page "https://github.com/taviso/ctypes.sh")
510 (synopsis "Foreign function interface for Bash")
511 (description "Bash-ctypes is a Bash plugin that provides a foreign
512function interface (FFI) directly in your shell. In other words, it allows
513you to call routines in shared libraries from within Bash.")
514 (license license:expat)))
515
516(define-public blesh
517 (package
518 (name "blesh")
519 (version "0.4.0-devel3")
520 (source (origin
521 (method git-fetch)
522 (uri (git-reference
523 (url "https://github.com/akinomyoga/ble.sh")
524 (commit (string-append "v" version))
525 (recursive? #t)))
526 (file-name (git-file-name name version))
527 (sha256
528 (base32
529 "19y9rmj9srl7akx33gl34l5qgz2ww0vlmi4j2r11029p8sn4s418"))))
530 (arguments
531 (list #:make-flags #~(list (string-append "PREFIX="
532 #$output))
533 #:phases #~(modify-phases %standard-phases
534 (add-after 'unpack 'pretend-.git-exists
535 (lambda _
536 (substitute* "ble.pp"
537 (("#%\\[commit_hash =.*")
538 (string-append "#%[commit_hash = " #$version "]\n")))
539 (mkdir-p ".git")))
540 (delete 'configure) ;no configure
541 (add-before 'check 'use-LANG-for-tests
542 (lambda _
543 (setenv "LANG"
544 (getenv "LC_ALL"))
545 (unsetenv "LC_ALL"))))))
546 (build-system gnu-build-system)
547 (native-inputs (list git less))
548 (home-page "https://github.com/akinomyoga/ble.sh")
549 (synopsis "Bash Line Editor")
550 (description
551 "Bash Line Editor (ble.sh) is a command line editor written in pure Bash
552which replaces the default GNU Readline. It adds syntax highlighting, auto
553suggestions, vim modes, and more to Bash interactive sessions.")
554 (license license:bsd-3)))
555
556(define-public bash-unit
557 (package
558 (name "bash-unit")
559 (version "2.3.2")
560 (home-page "https://github.com/pgrange/bash_unit")
561 (source
562 (origin
563 (method git-fetch)
564 (uri (git-reference
565 (url home-page)
566 (commit (string-append "v" version))))
567 (file-name (git-file-name name version))
568 (sha256
569 (base32 "1gb6vfr5m84bn1gbv7w3jr06fspylj1i3yqkvgxq0n3bncvs35wz"))))
570 (build-system copy-build-system)
571 (arguments
572 `(#:install-plan '(("bash_unit" "bin/"))
573 #:phases (modify-phases %standard-phases
574 (add-before 'install 'check
575 (lambda* (#:key tests? #:allow-other-keys)
576 (when tests?
577 (invoke "./bash_unit" "tests/test_core.sh")))))))
578 (inputs (list bash-minimal))
579 (synopsis "Bash unit testing framework")
580 (description
581 "@command{bash_unit} allows you to write unit tests, run them and, in case
582of failure, display the stack trace with source file and line number indications
583to locate the problem.")
584 (license license:gpl3+)))