1 { stdenv, lib, darwin, fetchFromGitHub, buildDunePackage, ocaml, cppo
2 , camlp-streams, dune-site
3 , version ? if lib.versionAtLeast ocaml.version "4.08" then "2.0.0" else "1.0.2"
8 "1.0.2" = lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
9 "camomile 1 is not available for OCaml ${ocaml.version}" {
10 src = fetchFromGitHub {
14 sha256 = "00i910qjv6bpk0nkafp5fg97isqas0bwjf7m6rz11rsxilpalzad";
17 nativeBuildInputs = [ cppo ];
21 ocaml configure.ml --share $out/share/camomile
26 echo "version = \"${version}\"" >> $out/lib/ocaml/${ocaml.version}/site-lib/camomile/META
32 src = fetchFromGitHub {
33 owner = "ocaml-community";
36 hash = "sha256-HklX+VPD0Ta3Knv++dBT2rhsDSlDRH90k4Cj1YtWIa8=";
39 nativeBuildInputs = lib.optional stdenv.isDarwin darwin.sigtool;
41 propagatedBuildInputs = [ camlp-streams dune-site ];
47 buildDunePackage (params."${version}" // {
52 homepage = "https://github.com/ocaml-community/Camomile";
53 maintainers = [ lib.maintainers.vbgl ];
54 license = lib.licenses.lgpl21;
55 description = "A Unicode library for OCaml";