at master 42 lines 935 B view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 ocaml, 6 findlib, 7 ocamlbuild, 8}: 9 10if lib.versionOlder ocaml.version "4.02" || lib.versionAtLeast ocaml.version "5.0" then 11 throw "erm_xml is not available for OCaml ${ocaml.version}" 12else 13 14 stdenv.mkDerivation { 15 pname = "ocaml${ocaml.version}-erm_xml"; 16 version = "0.3+20180112"; 17 18 src = fetchFromGitHub { 19 owner = "hannesm"; 20 repo = "xml"; 21 rev = "bbabdade807d8281fc48806da054b70dfe482479"; 22 sha256 = "sha256-OQdLTq9tJZc6XlcuPv2gxzYiQAUGd6AiBzfSi169XL0="; 23 }; 24 25 nativeBuildInputs = [ 26 ocaml 27 findlib 28 ocamlbuild 29 ]; 30 31 strictDeps = true; 32 33 createFindlibDestdir = true; 34 35 meta = { 36 homepage = "https://github.com/hannesm/xml"; 37 description = "XML Parser for discrete data"; 38 platforms = ocaml.meta.platforms or [ ]; 39 license = lib.licenses.bsd3; 40 maintainers = with lib.maintainers; [ vbgl ]; 41 }; 42 }