Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 39 lines 992 B view raw
1{ stdenv, lib, fetchFromGitHub, expat, ocaml, findlib, ounit }: 2 3lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02") 4 "ocaml_expat is not available for OCaml ${ocaml.version}" 5 6stdenv.mkDerivation rec { 7 pname = "ocaml${ocaml.version}-expat"; 8 version = "1.1.0"; 9 10 src = fetchFromGitHub { 11 owner = "whitequark"; 12 repo = "ocaml-expat"; 13 rev = "v${version}"; 14 sha256 = "07wm9663z744ya6z2lhiz5hbmc76kkipg04j9vw9dqpd1y1f2x3q"; 15 }; 16 17 prePatch = '' 18 substituteInPlace Makefile --replace "gcc" "\$(CC)" 19 ''; 20 21 nativeBuildInputs = [ ocaml findlib ]; 22 buildInputs = [ expat ]; 23 24 strictDeps = true; 25 26 doCheck = lib.versionAtLeast ocaml.version "4.08"; 27 checkTarget = "testall"; 28 checkInputs = [ ounit ]; 29 30 createFindlibDestdir = true; 31 32 meta = { 33 description = "OCaml wrapper for the Expat XML parsing library"; 34 license = lib.licenses.mit; 35 maintainers = [ lib.maintainers.vbgl ]; 36 inherit (src.meta) homepage; 37 inherit (ocaml.meta) platforms; 38 }; 39}