From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 EPPXFUR29mPtbwEAbAwnHQ (envelope-from ) for ; Wed, 22 Feb 2023 21:08:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kJX3FER29mPwRgAAG6o9tA (envelope-from ) for ; Wed, 22 Feb 2023 21:08:36 +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 BAB2D2FA22 for ; Wed, 22 Feb 2023 21:08:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUvPI-0002No-6t; Wed, 22 Feb 2023 15:08:04 -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 1pUvPG-0002NG-2R for guix-patches@gnu.org; Wed, 22 Feb 2023 15:08:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUvPF-0000iW-Qe for guix-patches@gnu.org; Wed, 22 Feb 2023 15:08:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUvPF-0005H5-IL for guix-patches@gnu.org; Wed, 22 Feb 2023 15:08:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54221] [PATCH 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: Wed, 22 Feb 2023 20:08: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.167709647920267 (code B ref 54221); Wed, 22 Feb 2023 20:08:01 +0000 Received: (at 54221) by debbugs.gnu.org; 22 Feb 2023 20:07:59 +0000 Received: from localhost ([127.0.0.1]:60416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUvPC-0005Gj-RT for submit@debbugs.gnu.org; Wed, 22 Feb 2023 15:07:59 -0500 Received: from knopi.disroot.org ([178.21.23.139]:57102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUvPA-0005GY-NS for 54221@debbugs.gnu.org; Wed, 22 Feb 2023 15:07:58 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2429141497; Wed, 22 Feb 2023 21:07:55 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id voI2xGSJASuI; Wed, 22 Feb 2023 21:07:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1677096474; bh=1JC8WokH3UlzxGzU+sXcJBehkg7TRyqKkjnEIugaLhU=; h=From:To:Cc:Subject:Date; b=Oa7UJ1T3wxnc8akC0uG8EmaReGpPAaUwvpUlHZFZmoJvIVl2q55XSJYOLxF5bRLlU G82Yp/PguzkASsiIGXbFzAwF8ttce4+BP4RfEvjnU1koSNg52ioQBEhQZc/j/Oaqoh aLDUfkhnsZLfFSuZyTv0r42CK/QUY/mggIkNT94/w7B6joLVktIjdMRLRdZTnnnvRa +rTFRD0x+CWH89PmI3gSM0atNS1Z8Tg7Z4t3i9+Ua3iWaiaIvyFVfBPjjrxCLPsZht 00bSEql7TxlK+qbye5HaZGI2L0jN4L70fC/9MPW+A/ot6JjkAKU8gWZvozKGrjAtdi pc0gWMjGcqAAQ== Date: Wed, 22 Feb 2023 17:07:28 -0300 Message-Id: <06694925c423c7e08e49e8384c0009c9f1cd2aa9.1677096448.git.seerlite@disroot.org> 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: , Reply-to: SeerLite X-ACL-Warn: , SeerLite via Guix-patches From: SeerLite via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=Oa7UJ1T3; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677096516; a=rsa-sha256; cv=none; b=FH9ElfJkotrrfHsjZ7S8EEnXGKC/Sc8MXpHBMtkeynNAGZp6RBjq5Sp7hZ/d4GOMJB5YHv vhIwXwJ5YFwxaj2rdLv1ui0F170m7aiBTxTqOaywlrYtah3+LCo+gs42muXTLPOIYBlHHA LG8mUONa9HhBfyf0uvQUr1jTxBAIFcngqgpOFY6XxB9nRHHoptFDe7CByrWAasiusRa/4P iL497Exz7Ss3a+1LenZ5EEzywm9ADAxJ3QiHjoJrRs3HUNwARsA97l5nLoR/FZgMX8CzfV 8ZAil0xoiH4YoDlcUVWbGXLbA90LBu1DFBNaZ8EVC1WxPHMVuieQakLQwbJAqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677096516; 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=rstgIT263yJiQN1l2+kHIu0P/2sVv2h3nQDN7d5W8ko=; b=KBOCkB92EW+tZ9WeQ7tK69WeW7/p6/mpvbjet1nyMPVu0N8ialjIKUnV+eZcAyAFV4x47J oF9GokaYbMyDmJjg3rT2+a/Ly1JvEx4rz4nu8jVqYfCzQPnqlKGpBQd6Qd2l7CCMOxn/Nz bVtYjAHq8EugWYECKdyH1VXCdJNLof38D2cg40HZhD6TNyG4NOWqNMthtvK+pXqhp/DP2w 7QKP0dv30wl2tAJDAMsgWsIL0jqyL/UncM3sGq+pIYPz4j59wrCenk1S+XaXbNRGgoLfKV WuOD+D1FPxh1ktcTUpLhgX98yeklClkDF2QBHFI1KDMfmYBa0lMBLsXlcFQrEQ== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=Oa7UJ1T3; 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"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.41 X-Spam-Score: -4.41 X-Migadu-Queue-Id: BAB2D2FA22 X-TUID: jRlf0vfoHVL4 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 6baf10915a..d4e4f88756 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, 2023 Luis Henrique Gomes Higino +;;; Copyright © 2023 SeerLite ;;; ;;; This file is part of GNU Guix. ;;; @@ -112,10 +113,10 @@ (define-public vim (substitute* "src/if_cscope.c" (("/bin/sh") (search-input-file inputs "/bin/sh"))))) (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"))) @@ -154,6 +155,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.39.1