forked from mirrors/nixpkgs
a13cdfe520
To keep this for the future we also strictDeps where possible, including for janePackages, topkg, oasis and ocamlbuild. This makes some closures significantly smaller and makes cross compilation easier
36 lines
854 B
Nix
36 lines
854 B
Nix
{ stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ocaml${ocaml.version}-expat";
|
|
version = "1.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "whitequark";
|
|
repo = "ocaml-expat";
|
|
rev = "v${version}";
|
|
sha256 = "07wm9663z744ya6z2lhiz5hbmc76kkipg04j9vw9dqpd1y1f2x3q";
|
|
};
|
|
|
|
prePatch = ''
|
|
substituteInPlace Makefile --replace "gcc" "\$(CC)"
|
|
'';
|
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
buildInputs = [ expat ounit ];
|
|
|
|
strictDeps = true;
|
|
|
|
doCheck = !lib.versionAtLeast ocaml.version "4.06";
|
|
checkTarget = "testall";
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
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;
|
|
};
|
|
}
|