1 { stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }:
3 lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02")
4 "ocaml_expat is not available for OCaml ${ocaml.version}"
6 stdenv.mkDerivation rec {
7 pname = "ocaml${ocaml.version}-expat";
10 src = fetchFromGitHub {
14 hash = "sha256-eDA6MUcztaI+fpunWBdanNnPo9Y5gvbj/ViVcxYYEBg=";
18 substituteInPlace Makefile --replace "gcc" "\$(CC)"
21 nativeBuildInputs = [ ocaml findlib ];
22 buildInputs = [ expat ];
26 doCheck = lib.versionAtLeast ocaml.version "4.08";
27 checkTarget = "testall";
28 checkInputs = [ ounit ];
30 createFindlibDestdir = true;
33 description = "OCaml wrapper for the Expat XML parsing library";
34 license = lib.licenses.mit;
35 maintainers = [ lib.maintainers.vbgl ];
36 inherit (src.meta) homepage;
37 inherit (ocaml.meta) platforms;