about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/camomile/default.nix
blob: 48bd376774218a7ed43f9e52b6db41abb5aa398d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchFromGitHub, ocaml, dune, cppo, findlib }:

stdenv.mkDerivation rec {
  pname = "camomile";
	version = "1.0.1";

	src = fetchFromGitHub {
		owner = "yoriyuki";
		repo = pname;
		rev = version;
		sha256 = "1pfxr9kzkpd5bsdqrpxasfxkawwkg4cpx3m1h6203sxi7qv1z3fn";
	};

	buildInputs = [ ocaml dune findlib cppo ];

	configurePhase = "ocaml configure.ml --share $out/share/camomile";

  # Use jbuilder executable because it breaks on dune>=1.10
  # https://github.com/yoriyuki/Camomile/commit/505202b58e22628f80bbe15ee76b9470a5bd2f57#r33816944
  buildPhase = ''
    jbuilder build -p ${pname}
  '';

  inherit (dune) installPhase;

	meta = {
		inherit (src.meta) homepage;
		maintainers = [ stdenv.lib.maintainers.vbgl ];
		license = stdenv.lib.licenses.lgpl21;
		description = "A Unicode library for OCaml";
	};
}