summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/reason-react/ppx.nix
blob: 578a356046789783d7c850f2e825df83c49ee77f (plain)
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
{
  buildDunePackage,
  fetchurl,
  lib,
  ppxlib,
  version ? if lib.versionAtLeast ppxlib.version "0.36" then "0.17.0" else "0.16.0",
}:

buildDunePackage (finalAttrs: {
  pname = "reason-react-ppx";
  inherit version;
  minimalOCamlVersion = "4.14";
  src = fetchurl {
    url = "https://github.com/reasonml/reason-react/releases/download/${finalAttrs.version}/reason-react-${finalAttrs.version}.tbz";
    hash =
      {
        "0.16.0" = "sha256-esPB+mvHHTQ3mUYILrkOjMELJxRDIsWleFcxIwOPQ1w=";
        "0.17.0" = "sha256-ArZ6CL1UjcGYPBvGnvQX7Qa16+mQT3T8mETHprT/MYw=";
      }
      ."${finalAttrs.version}";
  };
  buildInputs = [ ppxlib ];
  doCheck = false; # Needs to run in reason-react, see default.nix
  meta = {
    description = "React.js JSX PPX";
    homepage = "https://github.com/reasonml/reason-react";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.vog ];
  };
})