From patchwork Thu Feb 8 15:10:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 59957 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CF6B227BBEB; Thu, 8 Feb 2024 15:11:06 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 907FA27BBE2 for ; Thu, 8 Feb 2024 15:11:03 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rY638-0004hI-FL; Thu, 08 Feb 2024 10:10:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rY636-0004gt-2Z for guix-patches@gnu.org; Thu, 08 Feb 2024 10:10:48 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rY635-0007tT-7U for guix-patches@gnu.org; Thu, 08 Feb 2024 10:10:47 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rY63J-0003Px-KF for guix-patches@gnu.org; Thu, 08 Feb 2024 10:11:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54358] [PATCH] gnu: parinfer-rust: Add phase to install Vim and Kakoune plugins. References: <20220312220030.17172-1-paren@disroot.org> In-Reply-To: <20220312220030.17172-1-paren@disroot.org> Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Feb 2024 15:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54358 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54358@debbugs.gnu.org Cc: "\(unmatched-parenthesis" Received: via spool by 54358-submit@debbugs.gnu.org id=B54358.170740505513123 (code B ref 54358); Thu, 08 Feb 2024 15:11:01 +0000 Received: (at 54358) by debbugs.gnu.org; 8 Feb 2024 15:10:55 +0000 Received: from localhost ([127.0.0.1]:33428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY63D-0003PZ-1r for submit@debbugs.gnu.org; Thu, 08 Feb 2024 10:10:55 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:47059 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rY638-0003P5-FM for 54358@debbugs.gnu.org; Thu, 08 Feb 2024 10:10:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1707405027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pFvneAouSrfQO/51rjgFqoW/jRpwUKKG6YQLPdyX0GQ=; b=K8HMDgRWdd67DEG+lQ196VgTT24RanZdJvCJZbRizNnQ4/zW5mnVAMzK/eTsUPlADixARy LMpGWHc8Z7PhK45s3TAQGkpRwYdvw+kFmNmTjDF4McYkMy5XdwAEIwawp87EuvlOmNVKwX iptGisJcOD2Mt0xM9rW5qcHkPnZI+0BLudxSmjZC1R+E+NmR1pYBMs3GbPw0JhtzOj0/jj O8Vh1Oi8Pm4SsO6vRU9SmVIeEO9rssP9mma5h+X5UhDZV5xdiTxDbL23PzquH27siyFgEk LvACK7c9VAg6x1br7JsGFhme0xDlMv+BnNAuGED3Ah6O6MvSlbHETxGOIQV1EQ== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 8e5f46fa (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 8 Feb 2024 15:10:27 +0000 (UTC) Date: Thu, 8 Feb 2024 16:10:15 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: "(unmatched-parenthesis" * gnu/packages/text-editors.scm (rust-parinfer)[arguments]: Install the bundled Vim and Kakoune plugins. [outputs]: Add 'plugin' output. [description]: Specify how to refer to output. Change-Id: I881315481ec08c59576c4530ae72b877c399fc66 --- Hi, I think it's fine to have this patch as a separate issue, since it also adds the Vim editor plugin. The plugins and shared library are installed to the 'plugin' output. The Vim plugin shared library path is patched. Cheers, Herman gnu/packages/text-editors.scm | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) base-commit: 7d3aa578ef0b7fcfcddf0623f806ec625aab6ccd diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 3fefd59a19..b4d3c23e42 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -31,6 +31,8 @@ ;;; Copyright © 2023 Maxim Cournoyer ;;; Copyright © 2023 Jaeme Sifat ;;; Copyright © 2023 David Pflug +;;; Copyright © 2024 ( +;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -308,7 +310,10 @@ (define-public parinfer-rust (sha256 (base32 "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd")) (file-name (git-file-name name version)))) + (properties + `((output-synopsis "plugin" "Plugins with shared libraries"))) (build-system cargo-build-system) + (outputs (list "out" "plugin")) (arguments `(#:cargo-inputs (("rust-getopts" ,rust-getopts-0.2) @@ -318,15 +323,36 @@ (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 "plugin")) + (lib (string-append out "/lib")) + (vimfiles (string-append out "/share/vim/vimfiles/" + "pack/guix/start/parinfer")) + (doc (string-append vimfiles "/doc")) + (plugin (string-append vimfiles "/plugin")) + (autoload (string-append out "/share/kak/autoload"))) + (with-directory-excursion "target/release" + (install-file "libparinfer_rust.so" lib)) + (copy-recursively "doc" doc) + (copy-recursively "plugin" plugin) + (copy-recursively "rc" autoload) + (substitute* (string-append plugin "/parinfer.vim") + (("(let s:libdir = ).*" all libdir) + (format #f "~a'~a'\n" libdir lib))))))))) (inputs (list clang)) (home-page "https://github.com/justinbarclay/parinfer-rust") (synopsis "Infer parentheses for Clojure, Lisp and Scheme") (description "Parinfer is a plugin for Kakoune, Vim, Neovim and Emacs that infers -parentheses and indentation. This library can be called from other editors that -can load dynamic libraries.") +parentheses and indentation. This library can be called from other +editors that can load dynamic libraries. @code{gexp-input} can be used +to refer to the 'plugin' output of this package, within a +@code{home-environment} record.") (license license:expat))) (define-public joe