Subject: [bug#78315] [PATCH 03/53] gnu: emacs-webfeeder: Fix tests.

From: Nicolas Graves <[email-masked]>
Date: Thu, 8 May 2025 14:50:05 +0200

* gnu/packages/emacs-xyz.scm (emacs-webfeeder)
  [source]<snippet>: Reset timestamps for testdata.
  [arguments]<emacs>: Use emacs to ensure libxml is available.
---
 gnu/packages/emacs-xyz.scm | 29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index fdd38b18ff..b969b19051 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -36747,16 +36747,27 @@ (define-public emacs-webfeeder
   (name "emacs-webfeeder")
   (version "1.1.2")
   (source
-    (origin
-      (method url-fetch)
-      (uri (string-append
-             "https://elpa.gnu.org/packages/webfeeder-"
-             version
-             ".tar"))
-      (sha256
-        (base32
-          "1l128q424qsq9jv2wk8cv4zli71rk34q5kgwa9axdz0d27p9l6v4"))))
+   (origin
+     (method url-fetch)
+     (uri (string-append
+           "https://elpa.gnu.org/packages/webfeeder-" version ".tar"))
+     (sha256
+      (base32 "1l128q424qsq9jv2wk8cv4zli71rk34q5kgwa9axdz0d27p9l6v4"))
+     ;; Reset some timestamps for testdata.
+     (modules '((guix build utils)))
+     (snippet
+      #~(substitute* (find-files "testdata")
+          (("01:00:00 \\+0100")
+           "00:00:00 +0000")
+          (("01:00:00\\+01:00")
+           "00:00:00+00:00")
+          (("\\+0100")
+           "+0000")
+          (("\\+01:00")
+           "+00:00")))))
   (build-system emacs-build-system)
+  (arguments
+   `(#:emacs ,emacs))  ;tests require libxml
   (home-page "https://gitlab.com/Ambrevar/emacs-webfeeder")
   (synopsis "Build RSS and Atom webfeeds from HTML files")
   (description
-- 
2.49.0