2021-10-30 17:16:37 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, react, opaline }:
|
2014-10-10 23:33:22 +01:00
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if !lib.versionAtLeast ocaml.version "4.04"
|
2019-03-26 20:53:42 +00:00
|
|
|
then throw "reactiveData is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
2014-10-10 23:33:22 +01:00
|
|
|
|
2021-11-09 19:42:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml${ocaml.version}-reactiveData";
|
|
|
|
version = "0.2.2";
|
|
|
|
|
2021-10-30 17:16:37 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocsigen";
|
|
|
|
repo = "reactiveData";
|
|
|
|
rev = version;
|
2021-11-28 14:19:59 +00:00
|
|
|
sha256 = "sha256-YLkacIbjxZQ/ThgSxjTqviBYih6eW2GX5H7iybQDv1A=";
|
2014-10-10 23:33:22 +01:00
|
|
|
};
|
|
|
|
|
2018-05-28 07:52:45 +01:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild opaline ];
|
2017-10-05 06:57:03 +01:00
|
|
|
propagatedBuildInputs = [ react ];
|
2014-10-10 23:33:22 +01:00
|
|
|
|
|
|
|
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
|
|
|
|
|
2018-05-28 07:52:45 +01:00
|
|
|
installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR";
|
2014-10-10 23:33:22 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-10-10 23:33:22 +01:00
|
|
|
description = "An OCaml module for functional reactive programming (FRP) based on React";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ocsigen/reactiveData";
|
2014-10-10 23:33:22 +01:00
|
|
|
license = licenses.lgpl21;
|
2021-11-09 19:53:19 +00:00
|
|
|
platforms = ocaml.meta.platforms or [ ];
|
2014-10-10 23:33:22 +01:00
|
|
|
maintainers = with maintainers; [ vbgl ];
|
|
|
|
};
|
|
|
|
}
|