Skip to content

Commit e574201

Browse files
authored
ocamlPackages.reason-react: init at 0.15.0 (NixOS#361483)
2 parents 9d18644 + 4f8eb8d commit e574201

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
buildDunePackage,
3+
melange,
4+
reason,
5+
reason-react-ppx,
6+
}:
7+
8+
buildDunePackage {
9+
pname = "reason-react";
10+
inherit (reason-react-ppx) version src;
11+
nativeBuildInputs = [
12+
reason
13+
melange
14+
];
15+
buildInputs = [
16+
reason-react-ppx
17+
melange
18+
];
19+
doCheck = true;
20+
meta = reason-react-ppx.meta // {
21+
description = "Reason bindings for React.js";
22+
};
23+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
buildDunePackage,
3+
fetchurl,
4+
lib,
5+
ppxlib,
6+
}:
7+
8+
let
9+
version = "0.15.0";
10+
in
11+
buildDunePackage {
12+
pname = "reason-react-ppx";
13+
inherit version;
14+
minimalOCamlVersion = "4.14";
15+
src = fetchurl {
16+
url = "https://github.com/reasonml/reason-react/releases/download/${version}/reason-react-${version}.tbz";
17+
hash = "sha256-+pPJo/b50vp4pAC/ygI1LHB5O0pDJ1xpcQZOdFP8Q80=";
18+
};
19+
buildInputs = [
20+
ppxlib
21+
];
22+
doCheck = false; # Needs to run in reason-react, see default.nix
23+
meta = {
24+
description = "React.js JSX PPX";
25+
homepage = "https://github.com/reasonml/reason-react";
26+
license = lib.licenses.mit;
27+
maintainers = [
28+
lib.maintainers.vog
29+
];
30+
};
31+
}

pkgs/top-level/ocaml-packages.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,6 +1651,10 @@ let
16511651

16521652
reason-native = lib.recurseIntoAttrs (callPackage ../development/ocaml-modules/reason-native { });
16531653

1654+
reason-react = callPackage ../development/ocaml-modules/reason-react { };
1655+
1656+
reason-react-ppx = callPackage ../development/ocaml-modules/reason-react/ppx.nix { };
1657+
16541658
rebez = callPackage ../development/ocaml-modules/rebez { };
16551659

16561660
reperf = callPackage ../development/ocaml-modules/reperf { };

0 commit comments

Comments
 (0)