2021-01-15 22:18:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-02-05 17:12:51 +00:00
|
|
|
name = "ocaml${ocaml.version}-expat-${version}";
|
|
|
|
version = "1.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "whitequark";
|
|
|
|
repo = "ocaml-expat";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "07wm9663z744ya6z2lhiz5hbmc76kkipg04j9vw9dqpd1y1f2x3q";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile --replace "gcc" "\$(CC)"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = [ ocaml findlib expat ounit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
doCheck = !lib.versionAtLeast ocaml.version "4.06";
|
|
|
|
checkTarget = "testall";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
createFindlibDestdir = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = {
|
|
|
|
description = "OCaml wrapper for the Expat XML parsing library";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|