Subject: [PATCH v2 4/6] gnu: git-delta: Fix shell completion directories.

From: Efraim Flashner <[email-masked]>
Date: Thu, 27 Mar 2025 10:46:43 +0200

From: 45mg <[email-masked]>

* gnu/packages/rust-apps.scm (git-delta) [arguments]: Use the shell
completion directory variables.

Change-Id: I7825607cc15df5b6fec8322740d303b38842e401
---
 gnu/packages/rust-apps.scm | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 0371fd4c264..55861ecc924 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -4550,23 +4550,16 @@ (define-public git-delta
       #~(modify-phases %standard-phases
           (add-after 'install 'install-extras
             (lambda* (#:key outputs #:allow-other-keys)
-              (let* ((out (assoc-ref outputs "out"))
-                     (share (string-append out "/share"))
-                     (bash-completions-dir
-                      (string-append out "/etc/bash-completion.d"))
-                     (zsh-completions-dir
-                      (string-append share "/zsh/site-functions"))
-                     (fish-completions-dir
-                      (string-append share "/fish/vendor_completions.d")))
-                (mkdir-p bash-completions-dir)
-                (mkdir-p zsh-completions-dir)
-                (mkdir-p fish-completions-dir)
+              (let ((out (assoc-ref outputs "out")))
+                (mkdir-p (string-append out #$bash-completion-dir))
+                (mkdir-p (string-append out #$fish-completion-dir))
+                (mkdir-p (string-append out #$zsh-completion-dir))
                 (copy-file "etc/completion/completion.bash"
-                           (string-append bash-completions-dir "/delta"))
+                           (string-append out #$bash-completion-dir "/delta"))
                 (copy-file "etc/completion/completion.zsh"
-                           (string-append zsh-completions-dir "/_delta"))
+                           (string-append out #$zsh-completion-dir "/_delta"))
                 (copy-file "etc/completion/completion.fish"
-                           (string-append fish-completions-dir "/delta.fish"))))))))
+                           (string-append out #$fish-completion-dir "/delta.fish"))))))))
     (native-inputs (list git-minimal pkg-config))
     (inputs (list libgit2-1.7 openssl zlib))
     (home-page "https://github.com/dandavison/delta")
-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted