summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/jingoo/default.nix
blob: bf1e59c2f226a71ba9c2f3664435e0911219034c (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
{ stdenv, fetchFromGitHub, ocaml, findlib, pcre, uutf }:

if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "jingoo is not available for OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
  name = "ocaml${ocaml.version}-jingoo-${version}";
  version = "1.2.18";

  src = fetchFromGitHub {
    owner = "tategakibunko";
    repo = "jingoo";
    rev = "v${version}";
    sha256 = "0gciiysrjy5r4yiisc41k4h0p530yawzqnr364xg8fdkk444fgkn";
  };

  buildInputs = [ ocaml findlib ];
  propagatedBuildInputs = [ pcre uutf ];

  createFindlibDestdir = true;

  meta = with stdenv.lib; {
    homepage = "https://github.com/tategakibunko/jingoo";
    description = "OCaml template engine almost compatible with jinja2";
    license = licenses.mit;
    maintainers = [ maintainers.ericbmerritt ];
  };
}