Subject: [PATCH] gnu: podman: Install shell completions.
From: Michael Rohleder <[email-masked]>
To: [email-masked]
Cc: Michael Rohleder <[email-masked]>
Date: Wed, 14 Sep 2022 17:40:57 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/containers.scm (podman)[arguments]: Add 'install-completions
phase to install shell completions.
---
 gnu/packages/containers.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index 1f962ddfd6..029f0d4ba4 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2021 Timmy Douglas <[email-masked]>
 ;;; Copyright © 2022 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2022 Zhu Zihao <[email-masked]>
+;;; Copyright © 2022 Michael Rohleder <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -323,7 +324,11 @@ (define-public podman
                 (("/usr/local/libexec/cni")
                  (string-append #$(this-package-input "cni-plugins")
                                 "/bin"))
-                (("/usr/bin/crun") (which "crun"))))))))
+                (("/usr/bin/crun") (which "crun")))))
+          (add-after 'install 'install-completions
+            (lambda _
+              (invoke "make" "install.completions"
+                      (string-append "PREFIX=" #$output)))))))
     (inputs
      (list btrfs-progs
            cni-plugins
-- 
2.37.3