summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-02-05 23:27:38 +0200
committerEfraim Flashner <efraim@flashner.co.il>2020-02-06 10:48:17 +0200
commitb76473ecfd1274d37514c76764f5f107c7af6268 (patch)
treef4d2c800555a9018c7c437b1321c070a18260595 /gnu
parentd42cbbba3769e79d393835d35c14a25bbd9cf925 (diff)
downloadguix-b76473ecfd1274d37514c76764f5f107c7af6268.tar.gz
gnu: exa: Install extras.
* gnu/packages/rust-apps.scm (exa)[arguments]: Add phase to install man
page and shell completions.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/rust-apps.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 108d2fb573..118f914d92 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -96,7 +96,23 @@
                (("test!\\(leg:.*") "")
                (("test!\\(lid:.*") "")
                (("test!\\(original_g:.*") ""))
-             #t)))))
+             #t))
+         (add-after 'install 'install-extras
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out   (assoc-ref outputs "out"))
+                    (share (string-append out "/share"))
+                    (man1  (string-append share "/man/man1")))
+               (install-file "contrib/man/exa.1" man1)
+               (mkdir-p (string-append out "/etc/bash_completion.d"))
+               (mkdir-p (string-append share "/fish/vendor_completions.d"))
+               (mkdir-p (string-append share "/zsh/site-functions"))
+               (copy-file "contrib/completions.bash"
+                          (string-append out "/etc/bash_completion.d/exa"))
+               (copy-file "contrib/completions.fish"
+                          (string-append share "/fish/vendor_completions.d/exa.fish"))
+               (copy-file "contrib/completions.zsh"
+                          (string-append share "/zsh/site-functions/_exa"))
+               #t))))))
     (inputs
      `(("libgit2" ,libgit2)
        ("zlib" ,zlib)))