diff mbox

[PATCHv2,1/2] gnu: bash-completion: Modify to modify-phases.

Message ID 20160807100715.14652-1-sleep_walker@gnu.org
State New
Headers show

Commit Message

Tomáš Čech Aug. 7, 2016, 10:07 a.m. UTC
* gnu/packages/bash.scm(bash-completion): Use modify-phases instead of
  alist-cons-after.
---
 gnu/packages/bash.scm | 46 +++++++++++++++++++++++-----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

Comments

Leo Famulari Aug. 8, 2016, 9:10 p.m. UTC | #1
On Sun, Aug 07, 2016 at 12:07:14PM +0200, Tomáš Čech wrote:
> * gnu/packages/bash.scm(bash-completion): Use modify-phases instead of
>   alist-cons-after.

Please add a space before (bash-completion).

Otherwise, looks good to me!
diff mbox

Patch

diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index ff3acfc..c006546 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -289,29 +289,29 @@  without modification.")
     (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