diff options
Diffstat (limited to 'distro/packages/bash.scm')
-rw-r--r-- | distro/packages/bash.scm | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/distro/packages/bash.scm b/distro/packages/bash.scm index 32a72d2347..0306c7197e 100644 --- a/distro/packages/bash.scm +++ b/distro/packages/bash.scm @@ -32,7 +32,13 @@ "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" "-DNON_INTERACTIVE_LOGIN_SHELLS" "-DSSH_SOURCE_BASHRC") - " "))) + " ")) + (post-install-phase + '(lambda* (#:key outputs #:allow-other-keys) + ;; Add a `bash' -> `sh' link. + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion (string-append out "/bin") + (symlink "bash" "sh")))))) (package (name "bash") (version "4.2") @@ -67,15 +73,9 @@ ;; for now. #:tests? #f - #:phases - (alist-cons-after 'install 'post-install - (lambda* (#:key outputs #:allow-other-keys) - ;; Add a `bash' -> `sh' link. - (let ((out (assoc-ref outputs "out"))) - (with-directory-excursion - (string-append out "/bin") - (symlink "bash" "sh")))) - %standard-phases))) + #:phases (alist-cons-after 'install 'post-install + ,post-install-phase + %standard-phases))) (synopsis "GNU Bourne-Again Shell") (description "Bash is the shell, or command language interpreter, that will appear in @@ -87,3 +87,24 @@ use. In addition, most sh scripts can be run by Bash without modification.") (license gpl3+) (home-page "http://www.gnu.org/software/bash/")))) + +(define-public bash-light + ;; A stripped-down Bash for non-interactive use. + (package (inherit bash) + (name "bash-light") + (inputs '()) ; no readline, no curses + (arguments + (let ((args `(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1) + (srfi srfi-26)) + ,@(package-arguments bash)))) + (substitute-keyword-arguments args + ((#:configure-flags flags) + `(list "--without-bash-malloc" + "--disable-readline" + "--disable-history" + "--disable-help-builtin" + "--disable-progcomp" + "--disable-net-redirections" + "--disable-nls"))))))) |