python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / ocaml-modules / expat / 0.9.nix
blob326ffc60b1adc33422a5af318b2476a671ffa209
1 {stdenv, lib, fetchurl, ocaml, findlib, ounit, expat}:
3 let
4   pname = "ocaml-expat";
5   testcase = fetchurl {
6     url = "http://www.w3.org/TR/1998/REC-xml-19980210.xml";
7     sha256 = "00a3gsfvlkdhmcbziqhvpvy1zmcgbcihfqwcvl6ay03zf7gvw0k1";
8   };
12 stdenv.mkDerivation rec {
13   name = "${pname}-${version}";
14   version = "0.9.1";
16   src = fetchurl {
17     url = "http://www.xs4all.nl/~mmzeeman/ocaml/${pname}-${version}.tar.gz";
18     sha256 = "16n2j3y0jc9xgqyshw9plrwqnjiz30vnpbhahmgxlidbycw8rgjz";
19   };
21   nativeBuildInputs = [ocaml findlib ];
22   buildInputs = [ ounit expat];
24   strictDeps = true;
26   createFindlibDestdir = true;
28   patches = [ ./unittest.patch ];
30   postPatch = ''
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)"
36   '';
38   dontConfigure = true;         # Skip configure
40   buildPhase = ''
41     make all allopt
42   '';
44   doCheck = true;
46   checkTarget = "testall";
48   meta = {
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 ];
53   };