2021-01-11 12:49:15 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }:
|
2010-12-31 17:48:55 +00:00
|
|
|
|
2016-10-05 08:32:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2022-02-10 00:28:00 +00:00
|
|
|
pname = "ocaml${ocaml.version}-expat";
|
2021-01-21 00:24:35 +00:00
|
|
|
version = "1.1.0";
|
2017-11-01 23:32:41 +00:00
|
|
|
|
2021-01-21 00:24:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "whitequark";
|
|
|
|
repo = "ocaml-expat";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "07wm9663z744ya6z2lhiz5hbmc76kkipg04j9vw9dqpd1y1f2x3q";
|
|
|
|
};
|
2017-11-01 23:32:41 +00:00
|
|
|
|
2021-01-21 00:24:35 +00:00
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile --replace "gcc" "\$(CC)"
|
|
|
|
'';
|
2017-11-01 23:32:41 +00:00
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
buildInputs = [ expat ounit ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
2017-11-01 23:32:41 +00:00
|
|
|
|
2021-01-21 00:24:35 +00:00
|
|
|
doCheck = !lib.versionAtLeast ocaml.version "4.06";
|
|
|
|
checkTarget = "testall";
|
2017-11-01 23:32:41 +00:00
|
|
|
|
2021-01-21 00:24:35 +00:00
|
|
|
createFindlibDestdir = true;
|
2017-11-01 23:32:41 +00:00
|
|
|
|
2021-01-21 00:24:35 +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;
|
|
|
|
};
|
2010-12-31 17:48:55 +00:00
|
|
|
}
|