Skip to content

Commit

Permalink
ocamlPackages.reason-react: init at 0.15.0 (#361483)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrikstrid authored Dec 6, 2024
2 parents 9d18644 + 4f8eb8d commit e574201
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pkgs/development/ocaml-modules/reason-react/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
buildDunePackage,
melange,
reason,
reason-react-ppx,
}:

buildDunePackage {
pname = "reason-react";
inherit (reason-react-ppx) version src;
nativeBuildInputs = [
reason
melange
];
buildInputs = [
reason-react-ppx
melange
];
doCheck = true;
meta = reason-react-ppx.meta // {
description = "Reason bindings for React.js";
};
}
31 changes: 31 additions & 0 deletions pkgs/development/ocaml-modules/reason-react/ppx.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
buildDunePackage,
fetchurl,
lib,
ppxlib,
}:

let
version = "0.15.0";
in
buildDunePackage {
pname = "reason-react-ppx";
inherit version;
minimalOCamlVersion = "4.14";
src = fetchurl {
url = "https://github.com/reasonml/reason-react/releases/download/${version}/reason-react-${version}.tbz";
hash = "sha256-+pPJo/b50vp4pAC/ygI1LHB5O0pDJ1xpcQZOdFP8Q80=";
};
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
];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,10 @@ let

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

reason-react = callPackage ../development/ocaml-modules/reason-react { };

reason-react-ppx = callPackage ../development/ocaml-modules/reason-react/ppx.nix { };

rebez = callPackage ../development/ocaml-modules/rebez { };

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

0 comments on commit e574201

Please sign in to comment.