From 6c7f44efc24ce089c2c8e3c41b014ac05e20e119 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 19 Aug 2015 14:40:59 +0200 Subject: gnu: Add 'bash-static'. * gnu/packages/bash.scm (static-bash): New variable. --- gnu/packages/bash.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'gnu/packages/bash.scm') diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 6b2d0b855..fcfa337fa 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -239,6 +239,28 @@ without modification.") '("bash_cv_job_control_missing=no") '())))))))) +(define-public static-bash + ;; Statically-linked Bash that contains nothing but the 'bash' binary and + ;; 'sh' symlink, without any reference. + (let ((bash (static-package bash-light))) + (package + (inherit bash) + (name "bash-static") + (arguments + (substitute-keyword-arguments + `(#:allowed-references ("out") ,@(package-arguments bash)) + ((#:phases phases) + `(alist-cons-after + 'strip 'remove-everything-but-the-binary + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (remove-store-references (string-append bin "/bash")) + (delete-file (string-append bin "/bashbug")) + (delete-file-recursively (string-append out "/share")) + #t)) + ,phases))))))) + (define-public bash-completion (package (name "bash-completion") -- cgit v1.3 From f24931d841bc7879708cdeec93f9b79cee3dc670 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Thu, 3 Sep 2015 11:12:28 +0300 Subject: gnu: bash-light: Rename to bash-minimal. * gnu/packages/bash.scm (bash-light): Rename to ... (bash-minimal): ...this. (static-bash): Use it. * gnu/packages/make-bootstrap.scm (%bash-static): Use it. --- gnu/packages/bash.scm | 6 +++--- gnu/packages/make-bootstrap.scm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/packages/bash.scm') diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index fcfa337fa..180c64e87 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -214,10 +214,10 @@ without modification.") (license gpl3+) (home-page "http://www.gnu.org/software/bash/")))) -(define-public bash-light +(define-public bash-minimal ;; A stripped-down Bash for non-interactive use. (package (inherit bash) - (name "bash-light") + (name "bash-minimal") (inputs '()) ; no readline, no curses (arguments (let ((args `(#:modules ((guix build gnu-build-system) @@ -242,7 +242,7 @@ without modification.") (define-public static-bash ;; Statically-linked Bash that contains nothing but the 'bash' binary and ;; 'sh' symlink, without any reference. - (let ((bash (static-package bash-light))) + (let ((bash (static-package bash-minimal))) (package (inherit bash) (name "bash-static") diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index a12f4c15a..91f8bf895 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -115,7 +115,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." #:native-inputs native-inputs)) (define %bash-static - (static-package bash-light)) + (static-package bash-minimal)) (define %static-inputs ;; Packages that are to be used as %BOOTSTRAP-INPUTS. -- cgit v1.3