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

* gnu/packages/bash.scm (bash-completion): Use modify-phases instead of
  alist-cons-after.
master
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
1 changed files with 23 additions and 23 deletions

View File

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