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