From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wM7EM7aqZ18dBwAA0tVLHw (envelope-from ) for ; Sun, 20 Sep 2020 19:17:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mFqrL7aqZ1+9LQAAbx9fmQ (envelope-from ) for ; Sun, 20 Sep 2020 19:17:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 417AD940239 for ; Sun, 20 Sep 2020 19:17:10 +0000 (UTC) Received: from localhost ([::1]:60862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kK4pg-0007IO-AY for larch@yhetil.org; Sun, 20 Sep 2020 15:17:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kK4pa-0007II-Bq for guix-patches@gnu.org; Sun, 20 Sep 2020 15:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kK4pa-0003ku-1M for guix-patches@gnu.org; Sun, 20 Sep 2020 15:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kK4pZ-0005NK-Rk for guix-patches@gnu.org; Sun, 20 Sep 2020 15:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43539] [PATCH] gnu: vim: Automatically find vim plugins. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Sep 2020 19:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43539@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160062939520624 (code B ref -1); Sun, 20 Sep 2020 19:17:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Sep 2020 19:16:35 +0000 Received: from localhost ([127.0.0.1]:52661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK4p8-0005Ma-Qr for submit@debbugs.gnu.org; Sun, 20 Sep 2020 15:16:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:55488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kK4p6-0005MR-Lq for submit@debbugs.gnu.org; Sun, 20 Sep 2020 15:16:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kK4p6-0007F0-Fa for guix-patches@gnu.org; Sun, 20 Sep 2020 15:16:32 -0400 Received: from flashner.co.il ([178.62.234.194]:42004) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kK4p4-0003e1-Gv for guix-patches@gnu.org; Sun, 20 Sep 2020 15:16:32 -0400 Received: from localhost (unknown [31.210.181.177]) by flashner.co.il (Postfix) with ESMTPSA id 63719400B1; Sun, 20 Sep 2020 19:15:57 +0000 (UTC) From: Efraim Flashner Date: Sun, 20 Sep 2020 22:15:23 +0300 Message-Id: <20200920191523.6871-1-efraim@flashner.co.il> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/20 15:15:57 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: NqmXt6M4D2xi * gnu/packages/vim.scm (vim)[arguments]: Add new 'install-guix.vim phase to install vendor specific vimrc. * gnu/packages/aux-files/guix.vim: New file. * Makefile.am (AUX_FILES): Register it. --- Makefile.am | 1 + gnu/packages/aux-files/guix.vim | 7 +++++++ gnu/packages/vim.scm | 10 +++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/aux-files/guix.vim diff --git a/Makefile.am b/Makefile.am index 8e91e1e558..d0867ecd22 100644 --- a/Makefile.am +++ b/Makefile.am @@ -332,6 +332,7 @@ dist_noinst_DATA = \ AUX_FILES = \ gnu/packages/aux-files/chromium/master-preferences.json \ gnu/packages/aux-files/emacs/guix-emacs.el \ + gnu/packages/aux-files/guix.vim \ gnu/packages/aux-files/linux-libre/5.8-arm.conf \ gnu/packages/aux-files/linux-libre/5.8-arm64.conf \ gnu/packages/aux-files/linux-libre/5.8-i686.conf \ diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim new file mode 100644 index 0000000000..ca97f451d8 --- /dev/null +++ b/gnu/packages/aux-files/guix.vim @@ -0,0 +1,7 @@ +" This appends all of the vim plugins to the end of Vim's runtimepath. +for directory in ["/run/current-system/profile", $HOME . "/.guix-profile", $GUIX_ENVIRONMENT] + let testpath = directory . "/share/vim/vimfiles" + if isdirectory(testpath) + let &rtp = join([&rtp,testpath], ',') + endif +endfor diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index c6b1092e71..dba5b5a38e 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -136,7 +136,14 @@ (substitute* "src/testdir/test_popupwin.vim" ((".*Test_popup_drag_termwin.*" line) (string-append line "return\n"))) - #t))))) + #t)) + (add-after 'install 'install-guix.vim + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((vimdir (string-append (assoc-ref outputs "out") "/share/vim"))) + (mkdir-p vimdir) + (copy-file (assoc-ref inputs "guix.vim") + (string-append vimdir "/vimrc")) + #t)))))) (inputs `(("gawk" ,gawk) ("ncurses" ,ncurses) @@ -144,6 +151,7 @@ ("tcsh" ,tcsh))) ; For runtime/tools/vim32 (native-inputs `(("libtool" ,libtool) + ("guix.vim" ,(search-auxiliary-file "guix.vim")) ;; For tests. ("tzdata" ,tzdata-for-tests))) -- 2.28.0