ocamlPackages.xml-light: 2.4 → 2.5

This commit is contained in:
Vincent Laporte 2023-02-26 09:41:54 +01:00
parent 5d1eee6cf0
commit 0161dab815
No known key found for this signature in database
GPG key ID: EBD582ADDDB1F81F

View file

@ -1,35 +1,20 @@
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, gitUpdater }:
{ lib
, buildDunePackage
, fetchurl
}:
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
"xml-light is not available for OCaml ${ocaml.version}"
buildDunePackage rec {
pname = "xml-light";
version = "2.5";
stdenv.mkDerivation rec {
pname = "ocaml${ocaml.version}-xml-light";
version = "2.4";
duneVersion = "3";
minimalOCamlVersion = "4.03";
src = fetchFromGitHub {
owner = "ncannasse";
repo = "xml-light";
rev = version;
sha256 = "sha256-2txmkl/ZN5RGaLQJmr+orqwB4CbFk2RpLJd4gr7kPiE=";
src = fetchurl {
url = "https://github.com/ncannasse/xml-light/releases/download/${version}/xml-light-${version}.tbz";
hash = "sha256-9YwrPbcK0boICw0wauMvgsy7ldq7ksWZzcRn0eROAD0=";
};
nativeBuildInputs = [ ocaml findlib ];
strictDeps = true;
createFindlibDestdir = true;
installPhase = ''
runHook preInstall
make install_ocamlfind
mkdir -p $out/share
cp -vai doc $out/share/
runHook postInstall
'';
passthru.updateScript = gitUpdater { };
meta = {
description = "Minimal Xml parser and printer for OCaml";
longDescription = ''
@ -42,6 +27,5 @@ stdenv.mkDerivation rec {
homepage = "http://tech.motion-twin.com/xmllight.html";
license = lib.licenses.lgpl21;
maintainers = [ lib.maintainers.romildo ];
inherit (ocaml.meta) platforms;
};
}