diff mbox series

[bug#62178,v1,4/5] gnu: Add rapidxml.

Message ID 00d3c326-8ae2-86ad-5d4c-466334ad3c93@disroot.org
State New
Headers show
Series None | expand

Commit Message

Adam Faiz March 16, 2023, 6:31 a.m. UTC
From 470ac3c7e5cea2c08a64745037cd73af59027c26 Mon Sep 17 00:00:00 2001
Message-Id: <470ac3c7e5cea2c08a64745037cd73af59027c26.1678947948.git.adam.faiz@disroot.org>
In-Reply-To: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
References: <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@disroot.org>
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Tue, 14 Mar 2023 14:07:08 +0800
Subject: [PATCH v1 4/5] gnu: Add rapidxml.

* gnu/packages/xml.scm (rapidxml): New variable.
---
  gnu/packages/xml.scm | 30 ++++++++++++++++++++++++++++++
  1 file changed, 30 insertions(+)

Comments

Liliana Marie Prikler April 18, 2023, 5:28 p.m. UTC | #1
Am Donnerstag, dem 16.03.2023 um 14:31 +0800 schrieb Adam Faiz:
>  From 470ac3c7e5cea2c08a64745037cd73af59027c26 Mon Sep 17 00:00:00
> 2001
> Message-Id:
> <470ac3c7e5cea2c08a64745037cd73af59027c26.1678947948.git.adam.faiz@di
> sroot.org>
> In-Reply-To:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> References:
> <735f08bc3d271959685e03d761f5ac9039e5cfd3.1678947948.git.adam.faiz@di
> sroot.org>
> From: AwesomeAdam54321 <adam.faiz@disroot.org>
> Date: Tue, 14 Mar 2023 14:07:08 +0800
> Subject: [PATCH v1 4/5] gnu: Add rapidxml.
> 
> * gnu/packages/xml.scm (rapidxml): New variable.
> ---
>   gnu/packages/xml.scm | 30 ++++++++++++++++++++++++++++++
>   1 file changed, 30 insertions(+)
> 
> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
> index 0b26a63e85..c8dbd27772 100644
> --- a/gnu/packages/xml.scm
> +++ b/gnu/packages/xml.scm
> @@ -76,6 +76,7 @@ (define-module (gnu packages xml)
>     #:use-module (guix download)
>     #:use-module (guix git-download)
>     #:use-module (guix build-system cmake)
> +  #:use-module (guix build-system copy)
>     #:use-module (guix build-system gnu)
>     #:use-module (guix build-system meson)
>     #:use-module (guix build-system perl)
> @@ -1983,3 +1984,32 @@ (define-public python-xmltodict
>       (description "This package provides a Python library to convert
> XML to
>   @code{OrderedDict}.")
>       (license license:expat)))
> +
> +(define-public rapidxml
> +  (package
> +    (name "rapidxml")
> +    (version "1.13")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> +                    "https://sourceforge.net/projects/"
> +                    "rapidxml/files/rapidxml/rapidxml%20"
> +                    version "/rapidxml-" version ".zip"))
Small nitpick, you should try to fit this as 
              (uri (string-append
                    "https://sourceforge.net/projects/rapidxml/"
                    "files/rapidxml/rapidxml%20" version "/"
                    "rapidxml-" version ".zip"))
> +              (sha256
> +               (base32
> +               
> "0w9mbdgshr6sh6a5jr10lkdycjyvapbj7wxwz8hbp0a96y3biw63"))))
> +    (build-system copy-build-system)
> +    (native-inputs
> +     (list unzip))
Can go on one line, but arguments should be first.
> +    (arguments
> +     (list
> +      #:install-plan
> +      #~'(("./" "include/rapidxml" #:include-regexp ("\\.hpp$")))))
> +    (synopsis "XML Parser")
> +    (description
> +     "RapidXml is an attempt to create the fastest XML parser
> possible,
> +while retaining useability, portability and reasonable W3C
> compatibility.
> +  It is an in-situ parser written in modern C++, with parsing speed
> approaching
> +that of strlen function executed on the same data.")
I think we should avoid claims like "the fastest" in particular with
benchmarks referring to GCC 4 :)
Better, "RapidXml is a fast, mostly W3C-compatible XML DOM parser.  It
uses an in-situ parsing approach, that is it does not copy the input
string."
> +    (home-page "https://rapidxml.sourceforge.net/")
> +    (license license:boost1.0)))
Cheers
diff mbox series

Patch

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 0b26a63e85..c8dbd27772 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -76,6 +76,7 @@  (define-module (gnu packages xml)
    #:use-module (guix download)
    #:use-module (guix git-download)
    #:use-module (guix build-system cmake)
+  #:use-module (guix build-system copy)
    #:use-module (guix build-system gnu)
    #:use-module (guix build-system meson)
    #:use-module (guix build-system perl)
@@ -1983,3 +1984,32 @@  (define-public python-xmltodict
      (description "This package provides a Python library to convert XML to
  @code{OrderedDict}.")
      (license license:expat)))
+
+(define-public rapidxml
+  (package
+    (name "rapidxml")
+    (version "1.13")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://sourceforge.net/projects/"
+                    "rapidxml/files/rapidxml/rapidxml%20"
+                    version "/rapidxml-" version ".zip"))
+              (sha256
+               (base32
+                "0w9mbdgshr6sh6a5jr10lkdycjyvapbj7wxwz8hbp0a96y3biw63"))))
+    (build-system copy-build-system)
+    (native-inputs
+     (list unzip))
+    (arguments
+     (list
+      #:install-plan
+      #~'(("./" "include/rapidxml" #:include-regexp ("\\.hpp$")))))
+    (synopsis "XML Parser")
+    (description
+     "RapidXml is an attempt to create the fastest XML parser possible,
+while retaining useability, portability and reasonable W3C compatibility.
+  It is an in-situ parser written in modern C++, with parsing speed approaching
+that of strlen function executed on the same data.")
+    (home-page "https://rapidxml.sourceforge.net/")
+    (license license:boost1.0)))