From: SeerLite via Guix-patches via <guix-patches@gnu.org>
To: 54221@debbugs.gnu.org
Cc: SeerLite <seerlite@nixnet.email>
Subject: [bug#54221] [PATCH 3/4] gnu: vim: Update package style.
Date: Wed, 2 Mar 2022 10:17:34 -0300 [thread overview]
Message-ID: <da08c31cbea9bc194bf1eea68c3c532e28628310.1646227054.git.seerlite@nixnet.email> (raw)
In-Reply-To: <f06b71a730f11b473963e3925d216bf30f7f307e.1646227054.git.seerlite@nixnet.email>
* 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
--
2.34.0
next prev parent reply other threads:[~2022-03-02 14:22 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 13:11 [bug#54221] [PATCH 0/4] vim: Detect plugins via search paths SeerLite via Guix-patches via
2022-03-02 13:17 ` [bug#54221] [PATCH 1/4] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-03-02 13:17 ` [bug#54221] [PATCH 2/4] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-03-02 18:30 ` Maxime Devos
2022-03-02 13:17 ` SeerLite via Guix-patches via [this message]
2022-03-02 18:25 ` [bug#54221] [PATCH 3/4] gnu: vim: Update package style Maxime Devos
2022-03-02 18:29 ` Maxime Devos
2022-03-03 16:49 ` SeerLite via Guix-patches via
2022-03-03 17:46 ` Maxime Devos
2022-03-02 18:35 ` Maxime Devos
2022-03-03 17:40 ` SeerLite via Guix-patches via
2022-03-16 14:16 ` [bug#54221] [PATCH 0/4] vim: Detect plugins via search paths Ludovic Courtès
2022-05-13 2:34 ` seerlite--- via Guix-patches via
2022-05-19 1:11 ` [bug#54221] [PATCH v4 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-03-02 13:17 ` [bug#54221] [PATCH 4/4] gnu: neovim: Update package style SeerLite via Guix-patches via
2022-03-02 18:40 ` Maxime Devos
2022-03-03 17:36 ` SeerLite via Guix-patches via
2022-03-02 18:33 ` [bug#54221] [PATCH 1/4] gnu: vim: Use native-search-paths to search for plugins Maxime Devos
2022-05-13 2:17 ` [bug#54221] [PATCH v2 1/2] " SeerLite via Guix-patches via
2022-05-13 2:17 ` [bug#54221] [PATCH v2 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-19 0:50 ` [bug#54221] [PATCH v3 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-05-19 0:50 ` [bug#54221] [PATCH v3 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-19 1:08 ` [bug#54221] [PATCH v4 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-05-19 1:08 ` [bug#54221] [PATCH v4 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-19 1:14 ` [bug#54221] [PATCH v5 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-05-19 1:14 ` [bug#54221] [PATCH v5 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-19 1:15 ` SeerLite via Guix-patches via
2022-05-24 0:41 ` [bug#54221] [PATCH v6 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2022-05-24 0:41 ` [bug#54221] [PATCH v6 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2022-05-24 1:52 ` [bug#54221] [PATCH v6 1/2] gnu: vim: Use native-search-paths to search for plugins SeerLite via Guix-patches via
2023-02-22 20:07 ` [bug#54221] [PATCH " SeerLite via Guix-patches via
2023-02-22 20:07 ` [bug#54221] [PATCH 2/2] gnu: neovim: Search and use installed plugins, like vim SeerLite via Guix-patches via
2023-08-05 12:34 ` Liliana Marie Prikler
2023-08-05 12:28 ` [bug#54221] [PATCH 1/2] gnu: vim: Use native-search-paths to search for plugins Liliana Marie Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da08c31cbea9bc194bf1eea68c3c532e28628310.1646227054.git.seerlite@nixnet.email \
--to=guix-patches@gnu.org \
--cc=54221@debbugs.gnu.org \
--cc=seerlite@nixnet.email \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).