[PATCH] gnu: rust-parinfer: add phases to install the bundled Vim and Kakoune plugins

OpenSubmitted by (unmatched-parenthesis.
Details
One participant
  • (unmatched-parenthesis
Owner
unassigned
Severity
normal
(
(
(unmatched-parenthesis wrote on 12 Mar 23:00 +0100
(address . guix-patches@gnu.org)(name . (unmatched-parenthesis)(address . paren@disroot.org)
20220312220030.17172-1-paren@disroot.org
* gnu/packages/text-editors.scm (rust-parinfer)[arguments]: Install the bundled Vim and Kak plugins to the
correct directories.

This does not _technically_ depend on #54357, but the kakoune plugin will be essentially unusable without
it.
---
gnu/packages/text-editors.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 6d562d0e4a..bbfbcdd226 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -292,7 +292,18 @@ (define-public parinfer-rust
         ("rust-serde-json" ,rust-serde-json-1)
         ("rust-serde-derive" ,rust-serde-derive-1)
         ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
-        ("rust-unicode-width" ,rust-unicode-width-0.1))))
+        ("rust-unicode-width" ,rust-unicode-width-0.1))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-vim-plugin
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (copy-recursively "doc" (string-append out "/share/vim/vimfiles/doc"))
+               (copy-recursively "plugin" (string-append out "/share/vim/vimfiles/plugin")))))
+         (add-after 'install-vim-plugin 'install-kak-plugin
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (copy-recursively "rc" (string-append out "/share/kak/autoload"))))))))
     (inputs
      (list clang))
     (home-page "https://github.com/justinbarclay/parinfer-rust")
-- 
2.34.0
P
Superseded
(address . 54358@debbugs.gnu.org)
99f030efde43d752eb941d46243842e3@disroot.org
Superseded by https://issues.guix.gnu.org/54357#5.I couldn't figure out how to make git send one of the rebased emails to a
different address.
?