From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iDb9AtF4H2JkywAAgWs5BA (envelope-from ) for ; Wed, 02 Mar 2022 15:01:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0KJ4ANF4H2K6SwEA9RJhRA (envelope-from ) for ; Wed, 02 Mar 2022 15:01:53 +0100 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 ACE7842787 for ; Wed, 2 Mar 2022 15:01:52 +0100 (CET) Received: from localhost ([::1]:45506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPPY7-0000RW-Dz for larch@yhetil.org; Wed, 02 Mar 2022 09:01:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPOtf-0001jM-4Q for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPOte-0000RO-Pl for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPOte-0002RR-E6 for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54221] [PATCH 1/4] gnu: vim: Use native-search-paths to search for plugins. References: In-Reply-To: Resent-From: SeerLite Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Mar 2022 13:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54221 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54221@debbugs.gnu.org Cc: SeerLite Received: via spool by 54221-submit@debbugs.gnu.org id=B54221.16462271879306 (code B ref 54221); Wed, 02 Mar 2022 13:20:02 +0000 Received: (at 54221) by debbugs.gnu.org; 2 Mar 2022 13:19:47 +0000 Received: from localhost ([127.0.0.1]:39357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPOtO-0002Q1-If for submit@debbugs.gnu.org; Wed, 02 Mar 2022 08:19:46 -0500 Received: from mx.nixnet.email ([94.16.121.167]:56630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPOtN-0002Pr-9e for 54221@debbugs.gnu.org; Wed, 02 Mar 2022 08:19:45 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx.nixnet.email (Postfix) with ESMTPSA id 156E22003BC; Wed, 2 Mar 2022 08:19:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nixnet.email; s=202002021149; t=1646227184; h=from:from:reply-to:subject:subject:to:to:cc:cc; bh=udSImFvApcoewVwjElOHRcoDrRBc7i5s34IWjLK7tY4=; b=CG6ZMZZXkccnyaGtBWnHYQ6pk5F0fb4Drxz9vBa3qrXCJYndtlMO+LxFNJaihRKThJGnyo rAGPNRGgc6cgy3HzLnz9RunNAb1QDaT6rJ0Dl0B+c3HgRhIgWRSpTJ179sBdjG24SXQKjl F6lXI+rqwV/ujXi2UO8XOUoHna4P24Q= Date: Wed, 2 Mar 2022 10:17:32 -0300 Message-Id: X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: SeerLite X-ACL-Warn: , SeerLite via Guix-patches From: SeerLite via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646229712; h=from:from:sender:sender:reply-to: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=udSImFvApcoewVwjElOHRcoDrRBc7i5s34IWjLK7tY4=; b=rjWTtwq2ML155H725olpfGvBxXhXjYq+V5TU9GkbNj8WFefdCXeUfkIC9HnqUOfE/bumKr wtFXV0HUpmDOSsW8NlHB10hVaQG4pGfzHBAF2ShlTHXCYnc74aHXOKP+x2TUpW1JSiI+5i frCB0CYTNCWISjmjlc+QFdxZxOUzO2dNU6hAoIp3HKI647eIlulgk+v4IXlLj2jjB+ug3u iZGZB1DvVQvzfj3PszcqhMxo+Vb4pyFSJJh6RXPaFKkrLvao4q0I3Q1laHetvDB9Uym6Kc yGHaMWjfYirE2CulxYVDxHNwGk6QFWlSW+WAz8XH3rxMgHuBKb6q5X1UcTklxw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646229712; a=rsa-sha256; cv=none; b=GpT01PeJi+JNv54fdoJTsE2XyAarW/wIk/A/UMsYOgLd/zFP0qS678AWWQolWl9cShPOXl +vIyWz716Zu/MYapk1I2ZPhe/yPc6sIhQBRmxecr/TKBikbJD82ibIKm8MXOzh+A6NjCLT Fkn1iORgMgeXhXYpyyTPpyfpG16YUB7xj4EijD1Nu+InMEH5DoGOvWwKzl8wk4DTLZNQu9 NuWD7C5O3E/LXS/6q7F7MSAAJLjZekC0Hw8Xm9poPKm9iFIOxHVw1Gd34IZad3ZgTXSeBL nWV2vNR9nbXfkCWWHogSQ9Z1qJqoEsriI220OMbBPDOfvIalFvoKat1YAnhFgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=nixnet.email header.s=202002021149 header.b=CG6ZMZZX; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.68 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=nixnet.email header.s=202002021149 header.b=CG6ZMZZX; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: ACE7842787 X-Spam-Score: -3.68 X-Migadu-Scanner: scn1.migadu.com X-TUID: 8LP9xhipErHE Previously a hardcoded list of directories was used, which albeit quite accurate during normal use, didn't fully respect the active Guix environment and didn't make use of Guix's search-paths feature. * gnu/packages/aux-files/guix.vim: Use 'GUIX_VIMRUNTIME' to set the runtimepath. * gnu/packages/vim.scm (vim)[native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'. --- gnu/packages/aux-files/guix.vim | 11 ++++------- gnu/packages/vim.scm | 6 ++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gnu/packages/aux-files/guix.vim b/gnu/packages/aux-files/guix.vim index 9397c53701..3c13a16b7d 100644 --- a/gnu/packages/aux-files/guix.vim +++ b/gnu/packages/aux-files/guix.vim @@ -1,10 +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", $HOME ."/.guix-home/profile", $GUIX_PROFILE, $GUIX_ENVIRONMENT] - let vimplugins = directory . "/share/vim/vimfiles" - if isdirectory(vimplugins) - let &rtp = join([&rtp,vimplugins], ',') - endif -endfor +if !empty($GUIX_VIMRUNTIME) + set rtp+=$GUIX_VIMRUNTIME +endif + " Unconditionally add */after directories last, as intended by upstream " TODO: Remove duplicate */after directories for directory in [$VIM . "/vimfiles", $HOME ."/.vim"] diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index 28944dd640..7407ae71d7 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 Tissevert ;;; Copyright © 2021 Foo Chuan Wei +;;; Copyright © 2022 SeerLite ;;; ;;; This file is part of GNU Guix. ;;; @@ -150,6 +151,11 @@ (define-public vim (mkdir-p vimdir) (copy-file (assoc-ref inputs "guix.vim") (string-append vimdir "/vimrc")))))))) + (native-search-paths + (list (search-path-specification + (variable "GUIX_VIMRUNTIME") + (separator ",") + (files (list "share/vim/vimfiles"))))) (inputs (list gawk ncurses perl tcsh)) ; For runtime/tools/vim32 (native-inputs -- 2.34.0