2022-10-30 15:09:59 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, gitUpdater }:
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml${ocaml.version}-xml-light";
|
2020-04-24 23:36:52 +00:00
|
|
|
version = "2.4";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ncannasse";
|
|
|
|
repo = "xml-light";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-2txmkl/ZN5RGaLQJmr+orqwB4CbFk2RpLJd4gr7kPiE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-02-20 05:27:41 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
make install_ocamlfind
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -vai doc $out/share/
|
2022-02-20 05:27:41 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "Minimal Xml parser and printer for OCaml";
|
|
|
|
longDescription = ''
|
|
|
|
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 support also DTD parsing and checking, and is
|
|
|
|
entirely written in OCaml, hence it does not require additional C
|
|
|
|
library.
|
|
|
|
'';
|
|
|
|
homepage = "http://tech.motion-twin.com/xmllight.html";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.lgpl21;
|
|
|
|
maintainers = [ lib.maintainers.romildo ];
|
2022-02-20 05:27:41 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|