guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: guix-commits
Subject: 01/02: gnu: parinfer-rust: Add phase to install editor plugins.
Date: Sun, 11 Feb 2024 08:47:33 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit 8f258b7c7a63b5e3c38a44063330088c056fae94
Author: (unmatched-parenthesis <paren@disroot.org>
AuthorDate: Thu Feb 8 16:10:15 2024 +0100

    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>
---
 gnu/packages/text-editors.scm | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 3fefd59a19..977a101c97 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -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 @@ 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 @@ 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";)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]