guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/04: gnu: git: Install the Bash completion script.


From: Ludovic Courtès
Subject: 03/04: gnu: git: Install the Bash completion script.
Date: Tue, 03 Mar 2015 22:08:19 +0000

civodul pushed a commit to branch master
in repository guix.

commit 23c0e74375b3ee274068f850208feaaa3d28b9d6
Author: Ludovic Courtès <address@hidden>
Date:   Tue Mar 3 22:38:21 2015 +0100

    gnu: git: Install the Bash completion script.
    
    * gnu/packages/version-control.scm (git)[arguments]: Add
      'install-shell-completion' phase.
---
 gnu/packages/version-control.scm |  114 ++++++++++++++++++++-----------------
 1 files changed, 62 insertions(+), 52 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9fc310d..01d9720 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -147,63 +147,73 @@ as well as the classic centralized workflow.")
             (("/usr/bin/perl") (which "perl"))
             (("/usr/bin/python") (which "python"))))
         (alist-cons-after
-         'install 'split
-         (lambda* (#:key inputs outputs #:allow-other-keys)
-           ;; Split the binaries to the various outputs.
-           (let* ((out      (assoc-ref outputs "out"))
-                  (svn      (assoc-ref outputs "svn"))
-                  (gui      (assoc-ref outputs "gui"))
-                  (gitk     (string-append out "/bin/gitk"))
-                  (gitk*    (string-append gui "/bin/gitk"))
-                  (git-gui  (string-append out "/libexec/git-core/git-gui"))
-                  (git-gui* (string-append gui "/libexec/git-core/git-gui"))
-                  (git-cit  (string-append out "/libexec/git-core/git-citool"))
-                  (git-cit* (string-append gui "/libexec/git-core/git-citool"))
-                  (git-svn  (string-append out "/libexec/git-core/git-svn"))
-                  (git-svn* (string-append svn "/libexec/git-core/git-svn"))
-                  (git-sm   (string-append out
-                                           "/libexec/git-core/git-submodule")))
-             (mkdir-p (string-append gui "/bin"))
-             (mkdir-p (string-append gui "/libexec/git-core"))
-             (mkdir-p (string-append svn "/libexec/git-core"))
-
-             (for-each (lambda (old new)
-                         (copy-file old new)
-                         (delete-file old)
-                         (chmod new #o555))
-                       (list gitk git-gui git-cit git-svn)
-                       (list gitk* git-gui* git-cit* git-svn*))
-
-             ;; Tell 'git-svn' where Subversion is.
-             (wrap-program git-svn*
-                           `("PATH" ":" prefix
-                             (,(string-append (assoc-ref inputs "subversion")
-                                              "/bin")))
-                           `("PERL5LIB" ":" prefix
-                             (,(string-append (assoc-ref inputs "subversion")
-                                              "/lib/perl5/site_perl")))
-
-                           ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
-                           ;; help it find 'libsvn_client-1.so'.
-                           `("LD_LIBRARY_PATH" ":" prefix
-                             (,(string-append (assoc-ref inputs "subversion")
-                                              "/lib"))))
-
-             ;; Tell 'git-submodule' where Perl is.
-             (wrap-program git-sm
-                           `("PATH" ":" prefix
-                             (,(string-append (assoc-ref inputs "perl")
-                                              "/bin"))))
-
-             ;; Tell 'git' to look for core programs in the user's profile.
-             ;; This allows user to install other outputs of this package and
-             ;; have them transparently taken into account.  There's a
-             ;; 'GIT_EXEC_PATH' environment variable, but it's supposed to
-             ;; specify a single directory, not a search path.
-             (wrap-program (string-append out "/bin/git")
-                           `("PATH" ":" prefix
-                             ("$HOME/.guix-profile/libexec/git-core")))))
-         %standard-phases))))
+         'install 'install-shell-completion
+         (lambda* (#:key outputs #:allow-other-keys)
+           (let* ((out         (assoc-ref outputs "out"))
+                  (completions (string-append out "/etc/bash_completion.d")))
+             ;; TODO: Install the tcsh and zsh completions in the right place.
+             (mkdir-p completions)
+             (copy-file "contrib/completion/git-completion.bash"
+                        (string-append completions "/git.sh"))
+             #t))
+         (alist-cons-after
+          'install 'split
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            ;; Split the binaries to the various outputs.
+            (let* ((out      (assoc-ref outputs "out"))
+                   (svn      (assoc-ref outputs "svn"))
+                   (gui      (assoc-ref outputs "gui"))
+                   (gitk     (string-append out "/bin/gitk"))
+                   (gitk*    (string-append gui "/bin/gitk"))
+                   (git-gui  (string-append out "/libexec/git-core/git-gui"))
+                   (git-gui* (string-append gui "/libexec/git-core/git-gui"))
+                   (git-cit  (string-append out 
"/libexec/git-core/git-citool"))
+                   (git-cit* (string-append gui 
"/libexec/git-core/git-citool"))
+                   (git-svn  (string-append out "/libexec/git-core/git-svn"))
+                   (git-svn* (string-append svn "/libexec/git-core/git-svn"))
+                   (git-sm   (string-append out
+                                            
"/libexec/git-core/git-submodule")))
+              (mkdir-p (string-append gui "/bin"))
+              (mkdir-p (string-append gui "/libexec/git-core"))
+              (mkdir-p (string-append svn "/libexec/git-core"))
+
+              (for-each (lambda (old new)
+                          (copy-file old new)
+                          (delete-file old)
+                          (chmod new #o555))
+                        (list gitk git-gui git-cit git-svn)
+                        (list gitk* git-gui* git-cit* git-svn*))
+
+              ;; Tell 'git-svn' where Subversion is.
+              (wrap-program git-svn*
+                `("PATH" ":" prefix
+                  (,(string-append (assoc-ref inputs "subversion")
+                                   "/bin")))
+                `("PERL5LIB" ":" prefix
+                  (,(string-append (assoc-ref inputs "subversion")
+                                   "/lib/perl5/site_perl")))
+
+                ;; XXX: The .so for SVN/Core.pm lacks a RUNPATH, so
+                ;; help it find 'libsvn_client-1.so'.
+                `("LD_LIBRARY_PATH" ":" prefix
+                  (,(string-append (assoc-ref inputs "subversion")
+                                   "/lib"))))
+
+              ;; Tell 'git-submodule' where Perl is.
+              (wrap-program git-sm
+                `("PATH" ":" prefix
+                  (,(string-append (assoc-ref inputs "perl")
+                                   "/bin"))))
+
+              ;; Tell 'git' to look for core programs in the user's profile.
+              ;; This allows user to install other outputs of this package and
+              ;; have them transparently taken into account.  There's a
+              ;; 'GIT_EXEC_PATH' environment variable, but it's supposed to
+              ;; specify a single directory, not a search path.
+              (wrap-program (string-append out "/bin/git")
+                `("PATH" ":" prefix
+                  ("$HOME/.guix-profile/libexec/git-core")))))
+          %standard-phases)))))
    (synopsis "Distributed version control system")
    (description
     "Git is a free distributed version control system designed to handle



reply via email to

[Prev in Thread] Current Thread [Next in Thread]