efraim pushed a commit to branch rust-team
in repository guix.

commit 153dab83344b25da1dd67df43804b7af74101621
Author: Efraim Flashner <[email protected]>
AuthorDate: Sat Dec 28 20:38:17 2024 +0200

    gnu: skim: Build some manpages and shell completions.
    
    * gnu/packages/rust-apps.scm (skim)[arguments]: Add a phase to build
    some of the manpages and shell completions.
    
    Change-Id: I52a8d0f813e4e2c6e0c7d69d0dec442caf73e53b
---
 gnu/packages/rust-apps.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index aefb592555..340aca6d53 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -3650,6 +3650,14 @@ consecutive lines and since program start.")
                              (bin (string-append out "/bin"))
                              (sk  (car (find-files "target" "^sk$"))))
                         (install-file sk bin))))
+                  (add-after 'build 'build-extras
+                    (lambda _
+                      ;; Delete the manpages and completions before rebuilding.
+                      (for-each delete-file '("man/man1/sk.1"
+                                              "shell/completion.bash"
+                                              "shell/completion.zsh"))
+                      (invoke "cargo" "run" "--package" "xtask" "mangen")
+                      (invoke "cargo" "run" "--package" "xtask" "compgen")))
                   (add-after 'install 'install-extras
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let* ((out (assoc-ref outputs "out"))

Reply via email to