mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
gnu: Add 'bash-static'.
* gnu/packages/bash.scm (static-bash): New variable.
This commit is contained in:
parent
ced200328c
commit
6c7f44efc2
1 changed files with 22 additions and 0 deletions
|
@ -239,6 +239,28 @@ (define-public bash-light
|
|||
'("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")
|
||||
|
|
Loading…
Reference in a new issue