guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/05: gnu: grep: Use gexps.


From: guix-commits
Subject: 04/05: gnu: grep: Use gexps.
Date: Sun, 18 Aug 2024 11:36:50 -0400 (EDT)

civodul pushed a commit to branch core-updates
in repository guix.

commit 32d1f6fd987984bc37a38bd03db90968fb84e8f0
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Aug 18 17:28:43 2024 +0200

    gnu: grep: Use gexps.
    
    * gnu/packages/base.scm (grep)[arguments]: Use gexps.
    
    Change-Id: I7311667b8b929161d1e7290ddfe37c0e875364b2
---
 gnu/packages/base.scm | 65 +++++++++++++++++++++++++--------------------------
 1 file changed, 32 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index d58fe59b0b..f45bcd6ff2 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -132,39 +132,38 @@ command-line arguments, multiple languages, and so on.")
    (native-inputs (list perl))                   ;some of the tests require it
    (inputs (list pcre2))
    (arguments
-    `(#:configure-flags
-      (list "--enable-perl-regexp")
-
-      ;; XXX: On 32-bit Hurd platforms, 'time_t' is defined as a 32-bit
-      ;; integer in 'hurd_types.defs', so this Gnulib test always fails.
-      #:make-flags ,(if (and (not (%current-target-system))
-                             (string=? (%current-system) "i586-gnu"))
-                        ''("XFAIL_TESTS=test-year2038")
-                        ''())
-
-      #:phases
-      (modify-phases %standard-phases
-        (add-after 'install 'fix-egrep-and-fgrep
-          ;; Patch 'egrep' and 'fgrep' to execute 'grep' via its
-          ;; absolute file name instead of searching for it in $PATH.
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((out (assoc-ref outputs "out"))
-                   (bin (string-append out "/bin")))
-              (substitute* (list (string-append bin "/egrep")
-                                 (string-append bin "/fgrep"))
-                (("^exec grep")
-                 (string-append "exec " bin "/grep"))))))
-        ,@(if (system-hurd?)
-              '((add-before 'check 'skip-test
-                  (lambda _
-                    (substitute*
-                        ;; This test hangs
-                        '("tests/hash-collision-perf"
-                          ;; This test fails
-                          "tests/file")
-                      (("^#!.*" all)
-                       (string-append all "exit 77;\n"))))))
-              '()))))
+    (list #:configure-flags #~(list "--enable-perl-regexp")
+
+          ;; XXX: On 32-bit Hurd platforms, 'time_t' is defined as a 32-bit
+          ;; integer in 'hurd_types.defs', so this Gnulib test always fails.
+          #:make-flags
+          #~#$(if (and (not (%current-target-system))
+                       (string=? (%current-system) "i586-gnu"))
+                  #~'("XFAIL_TESTS=test-year2038")
+                  #~'())
+
+          #:phases
+          #~(modify-phases %standard-phases
+              (add-after 'install 'fix-egrep-and-fgrep
+                ;; Patch 'egrep' and 'fgrep' to execute 'grep' via its
+                ;; absolute file name instead of searching for it in $PATH.
+                (lambda* (#:key outputs #:allow-other-keys)
+                  (let* ((out (assoc-ref outputs "out"))
+                         (bin (string-append out "/bin")))
+                    (substitute* (list (string-append bin "/egrep")
+                                       (string-append bin "/fgrep"))
+                      (("^exec grep")
+                       (string-append "exec " bin "/grep"))))))
+              #$@(if (system-hurd?)
+                     #~((add-before 'check 'skip-test
+                          (lambda _
+                            (substitute* ;; This test hangs
+                                '("tests/hash-collision-perf"
+                                  ;; This test fails
+                                  "tests/file")
+                              (("^#!.*" all)
+                               (string-append all "exit 77;\n"))))))
+                     #~()))))
    (synopsis "Print lines matching a pattern")
    (description
      "grep is a tool for finding text inside files.  Text is found by



reply via email to

[Prev in Thread] Current Thread [Next in Thread]