summaryrefslogtreecommitdiff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2022-07-27 23:32:04 -0400
committer宋文武 <iyzsong@member.fsf.org>2022-08-03 13:51:05 +0800
commit1b5d4bf4be78d0d1fc980a91d846bc577f69e9ab (patch)
tree638cd6011f0fd0fba52c25b4cfd62ee65f05fb3c /gnu/packages/ocaml.scm
parentc99487c2356e6385425cd891db82810d333fa096 (diff)
gnu: Add ocaml-xml-light.
* gnu/packages/ocaml.scm (ocaml-xml-light): New variable. Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 8620d2bde3..c532e2a8b5 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2812,6 +2812,45 @@ environment, parse command line arguments, interact with the file system and
run command line programs.")
(license license:isc)))
+(define-public ocaml-xml-light
+ (package
+ (name "ocaml-xml-light")
+ (version "2.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ncannasse/xml-light")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "089ywjz84y4p5iln94y54vh03b5fm2zrl2dld1398dyrby96dp6s"))))
+ (build-system ocaml-build-system)
+ (arguments
+ (list #:tests? #f ; There are no tests.
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'prefix
+ (lambda _
+ (substitute* "Makefile"
+ (("`\\$\\(OCAMLC\\) -where`")
+ (string-append #$output "/lib/ocaml/site-lib/xml-light")))))
+ (delete 'configure) ; no configure
+ (add-before 'install 'mkdir
+ (lambda _
+ (mkdir-p (string-append #$output "/lib/ocaml/site-lib/xml-light"))))
+ (replace 'install
+ (lambda _
+ (invoke "make" "install_ocamlfind"))))))
+ (home-page "https://github.com/ncannasse/xml-light")
+ (synopsis "Minimal XML parser & printer for OCaml")
+ (description
+ "Xml-Light provides functions to parse an XML document into an OCaml data
+structure, work with it, and print it back to an XML document. It also
+supports DTD parsing and checking, and is entirely written in OCaml, hence it
+does not require additional C libraries.")
+ (license license:lgpl2.1+))) ; with linking exception
+
(define-public ocaml-xmlm
(package
(name "ocaml-xmlm")