GNU bug report logs - #72243
[PATCH] gnu: Add xlink-xsd.

Previous Next

Package: guix-patches;

Reported by: gemmaro <gemmaro.dev <at> gmail.com>

Date: Mon, 22 Jul 2024 12:02:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Bruno Victal <mirai <at> makinata.eu>
To: gemmaro <gemmaro.dev <at> gmail.com>
Cc: 72243 <at> debbugs.gnu.org
Subject: [bug#72243] [PATCH] gnu: Add xlink-xsd.
Date: Mon, 22 Jul 2024 15:36:45 +0100
Hi gemmaro,

On 2024-07-22 12:59, gemmaro wrote:

> +(define-public xlink-xsd
> +  (package
> +    (name "xlink-xsd")
> +    (version "1.1-2008-06")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (let* ((matches (string-match
> +                             "[0-9]+.[0-9]+-([0-9]{4})-([0-9]{2})" version))
> +                   (year (match:substring matches 1))
> +                   (month (match:substring matches 2)))
> +              (string-append "https://www.w3.org/XML/" year "/" month
> +                             "/xlink.xsd")))

Perhaps something like:

--8<---------------cut here---------------start------------->8---
(define-public …
  (let* ((year …)
         (month …)
         (version (string-join (list "1.1" year month) "-")))
    (package …)))
--8<---------------cut here---------------end--------------->8---

would be more readable instead of matching the version string with regex?

> +      #:install-plan #~'(("xlink.xsd" "/xml/dtd/xlink/xlink.xsd")
> +                         ("catalog.xml" "/xml/dtd/xlink/catalog.xml"))

I'd prefer to place these under "/xml/xsd/xlink/{xlink.xsd,catalog.xml}"
instead since these are not DTD files.


Cheers,

-- 
Bruno





This bug report was last modified 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.