1 {stdenv, lib, fetchurl, ocaml, findlib, ounit, expat}:
6 url = "http://www.w3.org/TR/1998/REC-xml-19980210.xml";
7 sha256 = "00a3gsfvlkdhmcbziqhvpvy1zmcgbcihfqwcvl6ay03zf7gvw0k1";
12 stdenv.mkDerivation rec {
13 name = "${pname}-${version}";
17 url = "http://www.xs4all.nl/~mmzeeman/ocaml/${pname}-${version}.tar.gz";
18 sha256 = "16n2j3y0jc9xgqyshw9plrwqnjiz30vnpbhahmgxlidbycw8rgjz";
21 nativeBuildInputs = [ocaml findlib ];
22 buildInputs = [ ounit expat];
26 createFindlibDestdir = true;
28 patches = [ ./unittest.patch ];
31 substituteInPlace "unittest.ml" \
32 --replace "/home/maas/xml-samples/REC-xml-19980210.xml.txt" "${testcase}"
33 substituteInPlace Makefile --replace "EXPAT_LIBDIR=/usr/local/lib" "EXPAT_LIBDIR=${expat.out}/lib" \
34 --replace "EXPAT_INCDIR=/usr/local/include" "EXPAT_INCDIR=${expat.dev}/include" \
35 --replace "gcc" "\$(CC)"
38 dontConfigure = true; # Skip configure
46 checkTarget = "testall";
49 homepage = "http://www.xs4all.nl/~mmzeeman/ocaml/";
50 description = "An ocaml wrapper for the Expat XML parsing library";
51 license = lib.licenses.mit;
52 maintainers = [ lib.maintainers.roconnor ];