From 9d6863de245fc061f24693b58ce87e73fe299d31 Mon Sep 17 00:00:00 2001 From: Michael Rohleder Date: Mon, 28 Dec 2020 14:36:22 +0100 Subject: gnu: borg: Install shell completions. * gnu/packages/backup.scm (borg)[arguments]: Add new 'install-shell-completions' phase. Signed-off-by: Leo Famulari --- gnu/packages/backup.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gnu/packages/backup.scm') diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 64fc23bf4c..ce6ea7fd49 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Nicolas Goaziou ;;; Copyright © 2020 Marcin Karpezo +;;; Copyright © 2020 Michael Rohleder ;;; ;;; This file is part of GNU Guix. ;;; @@ -672,6 +673,19 @@ detection, and lossless compression.") "docs/misc/internals-picture.txt" "docs/misc/prune-example.txt")) (copy-recursively "docs/man" man) + #t))) + (add-after 'install-docs 'install-shell-completions + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (etc (string-append out "/etc")) + (share (string-append out "/share"))) + (with-directory-excursion "scripts/shell_completions" + (install-file "bash/borg" + (string-append etc "/bash_completion.d")) + (install-file "zsh/_borg" + (string-append share "/zsh/site-functions")) + (install-file "fish/borg.fish" + (string-append share "/fish/vendor_completions.d"))) #t)))))) (native-inputs `(("python-cython" ,python-cython) -- cgit v1.2.3