From patchwork Wed Mar 2 13:17:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: SeerLite X-Patchwork-Id: 37577 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 4EEB427BBEA; Wed, 2 Mar 2022 14:01:51 +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=unavailable 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 0FCFD27BBE9 for ; Wed, 2 Mar 2022 14:01:51 +0000 (GMT) Received: from localhost ([::1]:45506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPPY6-0000RW-2z for patchwork@mira.cbaines.net; Wed, 02 Mar 2022 09:01:50 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: SeerLite X-ACL-Warn: , SeerLite via Guix-patches X-Patchwork-Original-From: SeerLite via Guix-patches via From: SeerLite X-getmail-retrieved-from-mailbox: Patches 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 From patchwork Wed Mar 2 13:17:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeerLite X-Patchwork-Id: 37576 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 191FB27BBEA; Wed, 2 Mar 2022 13:29:26 +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=unavailable 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 D4FFD27BBE9 for ; Wed, 2 Mar 2022 13:29:25 +0000 (GMT) Received: from localhost ([::1]:38004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPP2i-0005M1-QZ for patchwork@mira.cbaines.net; Wed, 02 Mar 2022 08:29:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPOtf-0001kc-EB for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPOtf-0000UF-3L for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPOte-0002RZ-VI for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54221] [PATCH 2/4] gnu: neovim: Search and use installed plugins, like vim. 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.16462271889320 (code B ref 54221); Wed, 02 Mar 2022 13:20:02 +0000 Received: (at 54221) by debbugs.gnu.org; 2 Mar 2022 13:19:48 +0000 Received: from localhost ([127.0.0.1]:39360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPOtP-0002QF-St for submit@debbugs.gnu.org; Wed, 02 Mar 2022 08:19:48 -0500 Received: from mx.nixnet.email ([94.16.121.167]:56638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPOtO-0002Q0-Jp for 54221@debbugs.gnu.org; Wed, 02 Mar 2022 08:19:47 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx.nixnet.email (Postfix) with ESMTPSA id 03EEF2020E7; Wed, 2 Mar 2022 08:19:44 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nixnet.email; s=202002021149; t=1646227186; h=from:from:reply-to:subject:subject:to:to:cc:cc; bh=FGn2RtqG+omSIqoSvtOy1imHWWHz0ee1V9UsU+NTRTg=; b=Oy5c+825I4sbuP7M/qEs9qryWWR8+4OsNfNckW8mZKiRDkmylp9CBrtm+097HQi0+voq3M MFfuIlCRuHoXTOyxN40Q230VAaHxqAtbuF0GI8uNjl7ufR/FeZ2NtM5trFm6cnH30Fa/YM IDBF1jc+mUixM9L0Rfn3GmFLztaPOQU= Date: Wed, 2 Mar 2022 10:17:33 -0300 Message-Id: <39a5e8f9c8f4e3fee5f36824780296f55995ae33.1646227054.git.seerlite@nixnet.email> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: SeerLite X-ACL-Warn: , SeerLite via Guix-patches X-Patchwork-Original-From: SeerLite via Guix-patches via From: SeerLite X-getmail-retrieved-from-mailbox: Patches * gnu/packages/vim.scm (neovim)[phases]{install-guix.vim}: New phase. [native-search-paths]: Add search path specification for 'GUIX_VIMRUNTIME'. --- gnu/packages/vim.scm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index 7407ae71d7..3997797201 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -714,7 +714,18 @@ (define-public neovim ;; doubles its size. We remove the refirence here. (substitute* "cmake/GetCompileFlags.cmake" (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc")) - #t))))) + #t)) + (add-after 'install 'install-guix.vim + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((nvimdir (string-append (assoc-ref outputs "out") "/share/nvim"))) + (mkdir-p nvimdir) + (copy-file (assoc-ref inputs "guix.vim") + (string-append nvimdir "/sysinit.vim")))))))) + (native-search-paths + (list (search-path-specification + (variable "GUIX_VIMRUNTIME") + (separator ",") + (files (list "share/vim/vimfiles"))))) (inputs `(("libuv" ,libuv) ("msgpack" ,msgpack) @@ -730,7 +741,8 @@ (define-public neovim (native-inputs `(("pkg-config" ,pkg-config) ("gettext" ,gettext-minimal) - ("gperf" ,gperf))) + ("gperf" ,gperf) + ("guix.vim" ,(search-auxiliary-file "guix.vim")))) (home-page "https://neovim.io") (synopsis "Fork of vim focused on extensibility and agility") (description "Neovim is a project that seeks to aggressively From patchwork Wed Mar 2 13:17:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeerLite X-Patchwork-Id: 37578 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 5B32827BBEA; Wed, 2 Mar 2022 14:22:14 +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=unavailable 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 B1B6127BBE9 for ; Wed, 2 Mar 2022 14:22:13 +0000 (GMT) Received: from localhost ([::1]:60186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPPro-0006Mm-ST for patchwork@mira.cbaines.net; Wed, 02 Mar 2022 09:22:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPOtg-0001mZ-0s for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPOtf-0000Y1-L9 for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPOtf-0002Rh-FN for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54221] [PATCH 3/4] gnu: vim: Update package style. Resent-From: SeerLite Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Mar 2022 13:20:03 +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.16462271939344 (code B ref 54221); Wed, 02 Mar 2022 13:20:03 +0000 Received: (at 54221) by debbugs.gnu.org; 2 Mar 2022 13:19:53 +0000 Received: from localhost ([127.0.0.1]:39364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPOtV-0002QY-4c for submit@debbugs.gnu.org; Wed, 02 Mar 2022 08:19:53 -0500 Received: from mx.nixnet.email ([94.16.121.167]:56642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPOtR-0002QO-CD for 54221@debbugs.gnu.org; Wed, 02 Mar 2022 08:19:51 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx.nixnet.email (Postfix) with ESMTPSA id B89822001F6; Wed, 2 Mar 2022 08:19:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nixnet.email; s=202002021149; t=1646227188; h=from:from:reply-to:subject:subject:to:to:cc:cc; bh=W/rNzeA4HrQZR4lnAUIZbfhKgvv3iFtY39lDxkywJc4=; b=FB9JHkIzDdwpsMBAtTYuqlJrOnEZmkOIhzWQ7mGJyCphokYtoPtT1NQjMPidOGiVLwTEit QZFip4KXGmdI6Vv/o8p5mqHWzqSuqe2RJ83y756pg+YqZSjIX18+Axk0xyiT5tgoUq7TTM sAc2gLRLxyGDz9dDoiGj7/1vvjH3K9c= Date: Wed, 2 Mar 2022 10:17:34 -0300 Message-Id: X-Mailer: git-send-email 2.34.0 In-Reply-To: References: 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: SeerLite X-ACL-Warn: , SeerLite via Guix-patches X-Patchwork-Original-From: SeerLite via Guix-patches via From: SeerLite X-getmail-retrieved-from-mailbox: Patches * gnu/packages/vim.scm (vim)[native-inputs]: Remove "guix.vim" gexp and remove labels. [arguments]: Convert to list of gexps and inline the "guix.vim" gexp. --- gnu/packages/vim.scm | 127 +++++++++++++++++++++---------------------- 1 file changed, 62 insertions(+), 65 deletions(-) diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index 3997797201..d5d8b412f7 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -89,68 +89,69 @@ (define-public vim "1jppzgmngcdd7jfb5rnkkvf5d47svnjbn7qj4mvjacd9az3c7s9r")))) (build-system gnu-build-system) (arguments - `(#:test-target "test" - #:parallel-tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'configure 'patch-absolute-paths - (lambda _ - (substitute* "runtime/tools/mve.awk" - (("/usr/bin/nawk") (which "gawk"))) - (substitute* '("src/testdir/Makefile" - "src/testdir/test_normal.vim" - "src/testdir/test_popupwin.vim" - "src/testdir/test_shell.vim" - "src/testdir/test_system.vim" - "src/testdir/test_terminal.vim" - "src/testdir/test_terminal2.vim") - (("/bin/sh") (which "sh"))) - (substitute* "src/testdir/test_autocmd.vim" - (("/bin/kill") (which "kill"))))) - (add-before 'check 'set-environment-variables - (lambda* (#:key inputs #:allow-other-keys) - ;; One of the tests tests timezone-dependent functions. - (setenv "TZDIR" - (search-input-directory inputs "share/zoneinfo")) + (list + #:test-target "test" + #:parallel-tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'configure 'patch-absolute-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "runtime/tools/mve.awk" + (("/usr/bin/nawk") (search-input-file inputs "bin/gawk"))) + (substitute* '("src/testdir/Makefile" + "src/testdir/test_normal.vim" + "src/testdir/test_popupwin.vim" + "src/testdir/test_shell.vim" + "src/testdir/test_system.vim" + "src/testdir/test_terminal.vim" + "src/testdir/test_terminal2.vim") + (("/bin/sh") (search-input-file inputs "bin/sh"))) + (substitute* "src/testdir/test_autocmd.vim" + (("/bin/kill") (search-input-file inputs "bin/kill"))))) + (add-before 'check 'set-environment-variables + (lambda* (#:key inputs #:allow-other-keys) + ;; One of the tests tests timezone-dependent functions. + (setenv "TZDIR" + (search-input-directory inputs "share/zoneinfo")) - ;; Make sure the TERM environment variable is set for the tests - (setenv "TERM" "xterm"))) - (add-before 'check 'skip-or-fix-failing-tests - (lambda _ - ;; This test assumes that PID 1 is run as root and that the user - ;; running the test suite does not have permission to kill(1, 0) - ;; it. This is not true in the build container, where both PID 1 - ;; and the test suite are run as the same user. Skip the test. - ;; An alternative fix would be to patch the PID used to a random - ;; 32-bit value and hope it never shows up in the test environment. - (substitute* "src/testdir/test_swap.vim" - (("if !IsRoot\\(\\)") "if 0")) + ;; Make sure the TERM environment variable is set for the tests + (setenv "TERM" "xterm"))) + (add-before 'check 'skip-or-fix-failing-tests + (lambda _ + ;; This test assumes that PID 1 is run as root and that the user + ;; running the test suite does not have permission to kill(1, 0) + ;; it. This is not true in the build container, where both PID 1 + ;; and the test suite are run as the same user. Skip the test. + ;; An alternative fix would be to patch the PID used to a random + ;; 32-bit value and hope it never shows up in the test environment. + (substitute* "src/testdir/test_swap.vim" + (("if !IsRoot\\(\\)") "if 0")) - ;; These tests check how the terminal looks after executing some - ;; actions. The path of the bash binary is shown, which results in - ;; a difference being detected. Patching the expected result is - ;; non-trivial due to the special format used, so skip the test. - (substitute* "src/testdir/test_terminal.vim" - ((".*Test_open_term_from_cmd.*" line) - (string-append line "return\n")) - ((".*Test_terminal_postponed_scrollback.*" line) - (string-append line "return\n")) - ((".*Test_combining_double_width.*" line) - (string-append line "return\n"))) - (substitute* "src/testdir/test_popupwin.vim" - ((".*Test_popup_drag_termwin.*" line) - (string-append line "return\n"))))) - (add-before 'install 'fix-installman.sh - (lambda _ - (substitute* "src/installman.sh" - (("/bin/sh") - (which "sh"))))) - (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")))))))) + ;; These tests check how the terminal looks after executing some + ;; actions. The path of the bash binary is shown, which results in + ;; a difference being detected. Patching the expected result is + ;; non-trivial due to the special format used, so skip the test. + (substitute* "src/testdir/test_terminal.vim" + ((".*Test_open_term_from_cmd.*" line) + (string-append line "return\n")) + ((".*Test_terminal_postponed_scrollback.*" line) + (string-append line "return\n")) + ((".*Test_combining_double_width.*" line) + (string-append line "return\n"))) + (substitute* "src/testdir/test_popupwin.vim" + ((".*Test_popup_drag_termwin.*" line) + (string-append line "return\n"))))) + (add-before 'install 'fix-installman.sh + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/installman.sh" + (("/bin/sh") + (search-input-file inputs "bin/sh"))))) + (add-after 'install 'install-guix.vim + (lambda _ + (let ((vimdir (string-append #$output "/share/vim")) + (vimrc #$(local-file (search-auxiliary-file "guix.vim")))) + (mkdir-p vimdir) + (copy-file vimrc (string-append vimdir "/vimrc")))))))) (native-search-paths (list (search-path-specification (variable "GUIX_VIMRUNTIME") @@ -159,11 +160,7 @@ (define-public vim (inputs (list gawk ncurses perl tcsh)) ; For runtime/tools/vim32 (native-inputs - `(("libtool" ,libtool) - ("guix.vim" ,(search-auxiliary-file "guix.vim")) - - ;; For tests. - ("tzdata" ,tzdata-for-tests))) + (list libtool tzdata-for-tests)) (home-page "https://www.vim.org/") (synopsis "Text editor based on vi") ;; The description shares language with the vim-full package. When making From patchwork Wed Mar 2 13:17:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeerLite X-Patchwork-Id: 37579 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 C009927BBEA; Wed, 2 Mar 2022 14:22:21 +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=unavailable 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 3A42D27BBE9 for ; Wed, 2 Mar 2022 14:22:21 +0000 (GMT) Received: from localhost ([::1]:60498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPPrw-0006at-CM for patchwork@mira.cbaines.net; Wed, 02 Mar 2022 09:22:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPOtk-0001tf-5B for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPOtg-0000ck-Gx for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPOtg-0002Rr-Ce for guix-patches@gnu.org; Wed, 02 Mar 2022 08:20:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54221] [PATCH 4/4] gnu: neovim: Update package style. Resent-From: SeerLite Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Mar 2022 13:20:04 +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.16462271959352 (code B ref 54221); Wed, 02 Mar 2022 13:20:04 +0000 Received: (at 54221) by debbugs.gnu.org; 2 Mar 2022 13:19:55 +0000 Received: from localhost ([127.0.0.1]:39366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPOtW-0002Qm-KP for submit@debbugs.gnu.org; Wed, 02 Mar 2022 08:19:54 -0500 Received: from mx.nixnet.email ([94.16.121.167]:56650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPOtU-0002QX-UP for 54221@debbugs.gnu.org; Wed, 02 Mar 2022 08:19:53 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mx.nixnet.email (Postfix) with ESMTPSA id 7F53B2020E7; Wed, 2 Mar 2022 08:19:49 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nixnet.email; s=202002021149; t=1646227190; h=from:from:reply-to:subject:subject:to:to:cc:cc; bh=W5MRP2bthoyalRBsVZ+YH/MoHgrawKTxZzY493OV+lg=; b=MxMuTvHkzDEyXW0kPM+O2XTzn4hKYXA8Uoq3oIMc053jQNZY0Ps+n1EyK6X7vvnMSYdDPR coeEMzCyC4TDhsOmupXf3Gj4+v5H5ViT/xjEBLTUT7HvEWfp1k/Za6THc7PdzwEHZupu6P 2yfPF5HuKIdGT6UX27ggUdeiewvmF8A= Date: Wed, 2 Mar 2022 10:17:35 -0300 Message-Id: <0ee8ec7a501cf53dc1b70b0ba21f72c0f3dc2d58.1646227054.git.seerlite@nixnet.email> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: SeerLite X-ACL-Warn: , SeerLite via Guix-patches X-Patchwork-Original-From: SeerLite via Guix-patches via From: SeerLite X-getmail-retrieved-from-mailbox: Patches * gnu/packages/vim.scm (neovim)[inputs]: Remove labels. [native-inputs]: Remove "guix.vim" gexp and remove labels. [arguments]: Convert to list of gexps, inline the "guix.vim" gexp, adjust lua input names and remove trailing #t's. --- gnu/packages/vim.scm | 114 +++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 59 deletions(-) diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index d5d8b412f7..5e6439ed00 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -676,70 +676,66 @@ (define-public neovim (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m")))) (build-system cmake-build-system) (arguments - `(#:modules ((srfi srfi-26) + (list + #:modules `((srfi srfi-26) (guix build cmake-build-system) (guix build utils)) - #:configure-flags '("-DPREFER_LUA:BOOL=YES") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-lua-paths - (lambda* (#:key inputs #:allow-other-keys) - (let* ((lua-version "5.1") - (lua-cpath-spec - (lambda (prefix) - (let ((path (string-append prefix "/lib/lua/" lua-version))) - (string-append path "/?.so;" path "/?/?.so")))) - (lua-path-spec - (lambda (prefix) - (let ((path (string-append prefix "/share/lua/" lua-version))) - (string-append path "/?.lua;" path "/?/?.lua")))) - (lua-inputs (map (cute assoc-ref inputs <>) - '("lua" - "lua-luv" - "lua-lpeg" - "lua-bitop" - "lua-libmpack")))) - (setenv "LUA_PATH" - (string-join (map lua-path-spec lua-inputs) ";")) - (setenv "LUA_CPATH" - (string-join (map lua-cpath-spec lua-inputs) ";")) - #t))) - (add-after 'unpack 'prevent-embedding-gcc-store-path - (lambda _ - ;; nvim remembers its build options, including the compiler with - ;; its complete path. This adds gcc to the closure of nvim, which - ;; doubles its size. We remove the refirence here. - (substitute* "cmake/GetCompileFlags.cmake" - (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc")) - #t)) - (add-after 'install 'install-guix.vim - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((nvimdir (string-append (assoc-ref outputs "out") "/share/nvim"))) - (mkdir-p nvimdir) - (copy-file (assoc-ref inputs "guix.vim") - (string-append nvimdir "/sysinit.vim")))))))) + #:configure-flags #~(list "-DPREFER_LUA:BOOL=YES") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-lua-paths + (lambda* (#:key inputs #:allow-other-keys) + (let* ((lua-version "5.1") + (lua-cpath-spec + (lambda (prefix) + (let ((path (string-append prefix "/lib/lua/" lua-version))) + (string-append path "/?.so;" path "/?/?.so")))) + (lua-path-spec + (lambda (prefix) + (let ((path (string-append prefix "/share/lua/" lua-version))) + (string-append path "/?.lua;" path "/?/?.lua")))) + (lua-inputs (map (cute assoc-ref inputs <>) + '("lua" + "lua5.1-luv" + "lua5.1-lpeg" + "lua5.1-bitop" + "lua5.1-libmpack")))) + (setenv "LUA_PATH" + (string-join (map lua-path-spec lua-inputs) ";")) + (setenv "LUA_CPATH" + (string-join (map lua-cpath-spec lua-inputs) ";"))))) + (add-after 'unpack 'prevent-embedding-gcc-store-path + (lambda _ + ;; nvim remembers its build options, including the compiler with + ;; its complete path. This adds gcc to the closure of nvim, which + ;; doubles its size. We remove the refirence here. + (substitute* "cmake/GetCompileFlags.cmake" + (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc")))) + (add-after 'install 'install-guix.vim + (lambda _ + (let ((vimdir (string-append #$output "/share/nvim")) + (vimrc #$(local-file (search-auxiliary-file "guix.vim")))) + (mkdir-p vimdir) + (copy-file vimrc (string-append vimdir "/sysinit.vim")))))))) (native-search-paths - (list (search-path-specification - (variable "GUIX_VIMRUNTIME") - (separator ",") - (files (list "share/vim/vimfiles"))))) + (list (search-path-specification + (variable "GUIX_VIMRUNTIME") + (separator ",") + (files (list "share/vim/vimfiles"))))) (inputs - `(("libuv" ,libuv) - ("msgpack" ,msgpack) - ("libtermkey" ,libtermkey) - ("libvterm" ,libvterm) - ("unibilium" ,unibilium) - ("jemalloc" ,jemalloc) - ("lua" ,lua-5.1) - ("lua-luv" ,lua5.1-luv) - ("lua-lpeg" ,lua5.1-lpeg) - ("lua-bitop" ,lua5.1-bitop) - ("lua-libmpack" ,lua5.1-libmpack))) + (list libuv + msgpack + libtermkey + libvterm + unibilium + jemalloc + lua-5.1 + lua5.1-luv + lua5.1-lpeg + lua5.1-bitop + lua5.1-libmpack)) (native-inputs - `(("pkg-config" ,pkg-config) - ("gettext" ,gettext-minimal) - ("gperf" ,gperf) - ("guix.vim" ,(search-auxiliary-file "guix.vim")))) + (list pkg-config gettext-minimal gperf)) (home-page "https://neovim.io") (synopsis "Fork of vim focused on extensibility and agility") (description "Neovim is a project that seeks to aggressively