gnu: bash-completion: Modify to modify-phases.

* gnu/packages/bash.scm (bash-completion): Use modify-phases instead of
  alist-cons-after.
This commit is contained in:
Tomáš Čech 2016-08-07 11:49:57 +02:00
parent cccb4d2652
commit aa67d3c546
No known key found for this signature in database
GPG key ID: 4A23E34FA033436D

View file

@ -289,29 +289,29 @@ (define-public bash-completion
(build-system gnu-build-system)
(native-inputs `(("util-linux" ,util-linux)))
(arguments
`(#:phases (alist-cons-after
'install 'remove-redundant-completions
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Util-linux comes with a bunch of completion files for
;; its own commands which are more sophisticated and
;; up-to-date than those of bash-completion. Remove those
;; from bash-completion.
(let* ((out (assoc-ref outputs "out"))
(util-linux (assoc-ref inputs "util-linux"))
(completions (string-append out
"/share/bash-completion"
"/completions"))
(already (find-files
(string-append
util-linux
"/etc/bash_completion.d"))))
(with-directory-excursion completions
(for-each (lambda (file)
(when (file-exists? file)
(delete-file file)))
(map basename already)))
#t))
%standard-phases)))
`(#:phases (modify-phases %standard-phases
(add-after
'install 'remove-redundant-completions
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Util-linux comes with a bunch of completion files for
;; its own commands which are more sophisticated and
;; up-to-date than those of bash-completion. Remove those
;; from bash-completion.
(let* ((out (assoc-ref outputs "out"))
(util-linux (assoc-ref inputs "util-linux"))
(completions (string-append out
"/share/bash-completion"
"/completions"))
(already (find-files
(string-append
util-linux
"/etc/bash_completion.d"))))
(with-directory-excursion completions
(for-each (lambda (file)
(when (file-exists? file)
(delete-file file)))
(map basename already)))
#t))))))
(synopsis "Bash completions for common commands")
(description
"This package provides extensions that allow Bash to provide adapted