gnu: parinfer-rust: Add phase to install editor plugins.

* gnu/packages/text-editors.scm (rust-parinfer)[arguments]: Install the
bundled Vim and Kakoune plugins.

Change-Id: I881315481ec08c59576c4530ae72b877c399fc66
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
(unmatched-parenthesis 2024-02-08 16:10:15 +01:00 committed by Efraim Flashner
parent b6439fc5f8
commit 8f258b7c7a
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -27,10 +27,12 @@
;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022 Andy Tai <atai@atai.org>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2023 Eidvilas Markevičius <markeviciuseidvilas@gmail.com>
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2023 Jaeme Sifat <jaeme@runbox.com>
;;; Copyright © 2023 David Pflug <david@pflug.io>
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;;
;;; This file is part of GNU Guix.
;;;
@ -310,7 +312,8 @@ (define-public parinfer-rust
(file-name (git-file-name name version))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
`(#:install-source? #f
#:cargo-inputs
(("rust-getopts" ,rust-getopts-0.2)
("rust-libc" ,rust-libc-0.2)
("rust-emacs" ,rust-emacs-0.11)
@ -318,7 +321,26 @@ (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-plugins-and-libs
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(vimfiles (string-append out "/share/vim/vimfiles/"
"pack/guix/start/parinfer")))
(with-directory-excursion "target/release"
(install-file "libparinfer_rust.so" lib))
(substitute* "plugin/parinfer.vim"
(("(let s:libdir = ).*" all libdir)
(format #f "~a'~a'\n" libdir lib)))
(install-file "doc/parinfer.txt"
(string-append vimfiles "/doc"))
(install-file "plugin/parinfer.vim"
(string-append vimfiles "/plugin"))
(install-file "rc/parinfer.kak"
(string-append out "/share/kak/autoload"))))))))
(inputs
(list clang))
(home-page "https://github.com/justinbarclay/parinfer-rust")