guix-patches
[Top][All Lists]
Advanced

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

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


From: Bruno Victal
Subject: [bug#72243] [PATCH] gnu: Add xlink-xsd.
Date: Mon, 22 Jul 2024 15:36:45 +0100
User-agent: Mozilla Thunderbird

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






reply via email to

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