From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2Et9MTAqjGL05gAAbAwnHQ (envelope-from ) for ; Tue, 24 May 2022 02:43:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ON9NMTAqjGI0fQEAauVa8A (envelope-from ) for ; Tue, 24 May 2022 02:43:28 +0200 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 368673AE95 for ; Tue, 24 May 2022 02:43:28 +0200 (CEST) Received: from localhost ([::1]:43592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntIdw-0002io-30 for larch@yhetil.org; Mon, 23 May 2022 20:43:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntIdZ-0002iV-W5 for guix-patches@gnu.org; Mon, 23 May 2022 20:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntIdZ-0008GV-O6 for guix-patches@gnu.org; Mon, 23 May 2022 20:43:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ntIdZ-0000ac-Iw for guix-patches@gnu.org; Mon, 23 May 2022 20:43:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54221] [PATCH v6 1/2] 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: Tue, 24 May 2022 00:43:01 +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.16533529272188 (code B ref 54221); Tue, 24 May 2022 00:43:01 +0000 Received: (at 54221) by debbugs.gnu.org; 24 May 2022 00:42:07 +0000 Received: from localhost ([127.0.0.1]:50460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntIcg-0000Z9-E0 for submit@debbugs.gnu.org; Mon, 23 May 2022 20:42:06 -0400 Received: from mx.nixnet.email ([94.16.121.167]:40516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ntIcc-0000Yg-6O for 54221@debbugs.gnu.org; Mon, 23 May 2022 20:42:04 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx.nixnet.email (Postfix) with ESMTPSA id 5854B200306; Mon, 23 May 2022 20:41:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nixnet.email; s=202002021149; t=1653352920; h=from:from:reply-to:subject:subject:to:to:cc:cc; bh=AG3MYRko1fdcK+NeZZaCzK4tQJ2NHAon/EYHXhaf12A=; b=NU7QoR0sP9Argu9jlgBFU6x3Mv7t8TcLdIomqdz/a+Ojyf0n1KVg2VNxBLcj96h3Wuu6Mz u8DS00VnwYtdxNBrqS1eTsgUT9QdwJ1wcBv9vrXd9C+zAFU0kdk4WRsMxOKewQ1/iMsULP n272N255K0xdFjVXbyJqh/Ntxi0mgrc= Date: Mon, 23 May 2022 20:41:54 -0400 Message-Id: <81321483b3ea03870a94a5fce3931ba176269f73.1653352914.git.seerlite@nixnet.email> X-Mailer: git-send-email 2.36.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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653353008; 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=AG3MYRko1fdcK+NeZZaCzK4tQJ2NHAon/EYHXhaf12A=; b=WmeYHNbXjZYrJSf4caipCqeNoX+14tq/HEJDzlgslp49vnH55Qps/oJTLC8RwsgX7UiLNQ 9GgqctL11r37+Yks402IggTmg7hF32P665suVpnXsVW/Ben559bEktG/RNLjEOAfSG69Zt Pd7qrmm8/2lz9U2fW0P05Skh0DXhhJIW2iEbzZ8WyqAdz/gODO62EtdL604xe+gXPhByMa 8EubkQFStSSoHftTxMsWkIbLDXfsN+xOXHE8MlIWg7z7olcmrriT6N5VeB7Xuq77K7q+Cg 879dTspdHQkUNDOzcB7ggafmkkyPVT1pIaLHNYBEna6iUqJyWtSayv6P4RTLAw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653353008; a=rsa-sha256; cv=none; b=rjs8O08VtmKZU4Q8Ridp4S94YmSchMeAC5ZaCYD2EE4S2kdQqyAOx/oYPNSzPpEHAtEaRK xRaLUs79eN8VKKalwkhI1oX3rq71SFHNWV1PJVZsGdND56ZJZRj+syi/Qgb1Tx3IVP/T3c kd78BgGN0I405fuknId/sTampCbTckBOyWOJewNTed5epdAY+bsSv5iDEbsUix2uP25/C1 IQvewIEwtpHVdKmMfx4mSojdMCCYoQo38QUdpxAG+H/QXf3GFCq+deJrrxh+WOr5ykuJOn F1xoM2Y7J8jnoFORQOORaZSW0uVA6XL/jgZf6zeh3vTYYkldm3pzFOjd7uXBbw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=nixnet.email header.s=202002021149 header.b=NU7QoR0s; 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: -2.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=nixnet.email header.s=202002021149 header.b=NU7QoR0s; 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: 368673AE95 X-Spam-Score: -2.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: ZEaOXmzdYxqu 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'. [phases]: Search for tzdata files in the correct input fields. --- gnu/packages/aux-files/guix.vim | 11 ++++------- gnu/packages/vim.scm | 10 ++++++++-- 2 files changed, 12 insertions(+), 9 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 caf9ea85b3..791aecbb83 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2021 Tissevert ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2022 Luis Henrique Gomes Higino +;;; Copyright © 2022 SeerLite ;;; ;;; This file is part of GNU Guix. ;;; @@ -108,10 +109,10 @@ (define-public vim (substitute* "src/testdir/test_autocmd.vim" (("/bin/kill") (which "kill"))))) (add-before 'check 'set-environment-variables - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) ;; One of the tests tests timezone-dependent functions. (setenv "TZDIR" - (search-input-directory inputs "share/zoneinfo")) + (search-input-directory (or native-inputs inputs) "share/zoneinfo")) ;; Make sure the TERM environment variable is set for the tests (setenv "TERM" "xterm"))) @@ -147,6 +148,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.36.0