2017-11-02 00:32:41 +01:00
|
|
|
{ stdenv, fetchFromGitHub, expat, ocaml, findlib, ounit }:
|
2010-12-31 18:48:55 +01:00
|
|
|
|
2016-10-05 09:32:30 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2017-11-02 00:32:41 +01:00
|
|
|
name = "ocaml${ocaml.version}-expat-${version}";
|
2018-03-31 06:53:20 +02:00
|
|
|
version = "1.1.0";
|
2017-11-02 00:32:41 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "whitequark";
|
|
|
|
repo = "ocaml-expat";
|
|
|
|
rev = "v${version}";
|
2018-03-31 06:53:20 +02:00
|
|
|
sha256 = "07wm9663z744ya6z2lhiz5hbmc76kkipg04j9vw9dqpd1y1f2x3q";
|
2017-11-02 00:32:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace Makefile --replace "gcc" "\$(CC)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib expat ounit ];
|
|
|
|
|
|
|
|
doCheck = !stdenv.lib.versionAtLeast ocaml.version "4.06";
|
|
|
|
checkTarget = "testall";
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "OCaml wrapper for the Expat XML parsing library";
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
2010-12-31 18:48:55 +01:00
|
|
|
}
|