guix-commits
[Top][All Lists]
Advanced

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

04/05: self: Install shell completion files.


From: Ludovic Courtès
Subject: 04/05: self: Install shell completion files.
Date: Tue, 6 Nov 2018 11:00:10 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit e3744779aabc4badd992f52ebaa085e6d68a2eeb
Author: Ludovic Courtès <address@hidden>
Date:   Tue Nov 6 15:48:04 2018 +0100

    self: Install shell completion files.
    
    * guix/self.scm (miscellaneous-files): New procedure.
    (whole-package): Remove #:substitute-keys, add #:miscellany.
    [build]: Remove code for SUBSTITUTE-KEYS and add code to copy MISCELLANY
    to OUTPUT.
    (compiled-guix): Adjust call to 'whole-package'.
---
 guix/self.scm | 34 ++++++++++++++++++++++++----------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/guix/self.scm b/guix/self.scm
index 4322397..96fef44 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -405,11 +405,28 @@ load path."
                       (apply guix-main (command-line))))
                 #:guile guile))
 
+(define (miscellaneous-files source)
+  "Return data files taken from SOURCE."
+  (file-mapping "guix-misc"
+                `(("etc/bash_completion.d/guix"
+                   ,(file-append* source "/etc/completion/bash/guix"))
+                  ("etc/bash_completion.d/guix-daemon"
+                   ,(file-append* source "/etc/completion/bash/guix-daemon"))
+                  ("share/zsh/site-functions/_guix"
+                   ,(file-append* source "/etc/completion/zsh/_guix"))
+                  ("share/fish/vendor_completions.d/guix.fish"
+                   ,(file-append* source "/etc/completion/fish/guix.fish"))
+                  ("share/guix/hydra.gnu.org.pub"
+                   ,(file-append* source
+                                  "/etc/substitutes/hydra.gnu.org.pub"))
+                  ("share/guix/berlin.guixsd.org.pub"
+                   ,(file-append* source 
"/etc/substitutes/berlin.guixsd.org.pub")))))
+
 (define* (whole-package name modules dependencies
                         #:key
                         (guile-version (effective-version))
                         compiled-modules
-                        info daemon substitute-keys
+                        info daemon miscellany
                         guile
                         (command (guix-command modules
                                                #:dependencies dependencies
@@ -424,6 +441,7 @@ assumed to be part of MODULES."
                  (with-imported-modules '((guix build utils))
                    #~(begin
                        (use-modules (guix build utils))
+
                        (mkdir-p (string-append #$output "/bin"))
                        (symlink #$command
                                 (string-append #$output "/bin/guix"))
@@ -432,13 +450,6 @@ assumed to be part of MODULES."
                          (symlink (string-append #$daemon "/bin/guix-daemon")
                                   (string-append #$output "/bin/guix-daemon")))
 
-                       (when #$substitute-keys
-                         (mkdir-p (string-append #$output "/share/guix"))
-                         (copy-recursively #$substitute-keys
-                                           (string-append #$output
-                                                          "/share/guix")
-                                           #:log (%make-void-port "w")))
-
                        (let ((modules (string-append #$output
                                                      "/share/guile/site/"
                                                      (effective-version)))
@@ -450,6 +461,10 @@ assumed to be part of MODULES."
                                     (string-append #$output
                                                    "/share/info"))))
 
+                       (when #$miscellany
+                         (copy-recursively #$miscellany #$output
+                                           #:log (%make-void-port "w")))
+
                        ;; Object files.
                        (when #$compiled-modules
                          (let ((modules (string-append #$output "/lib/guile/"
@@ -675,8 +690,7 @@ assumed to be part of MODULES."
                                                'guix-daemon)
 
                           #:info (info-manual source)
-                          #:substitute-keys (file-append* source
-                                                          "etc/substitutes")
+                          #:miscellany (miscellaneous-files source)
                           #:guile-version guile-version)))
         ((= 0 pull-version)
          ;; Legacy 'guix pull': return the .scm and .go files as one



reply via email to

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