2016-05-30 16:36:49 +01:00
|
|
|
{stdenv, fetchurl, ocaml, findlib, ocaml_react, camlp4, opam}:
|
2014-10-10 23:33:22 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
ocamlVersion = stdenv.lib.getVersion ocaml;
|
|
|
|
in
|
|
|
|
|
|
|
|
assert stdenv.lib.versionAtLeast ocamlVersion "3.11";
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-05-30 16:36:49 +01:00
|
|
|
name = "ocaml-reactiveData-0.2";
|
2014-10-10 23:33:22 +01:00
|
|
|
src = fetchurl {
|
2016-05-30 16:36:49 +01:00
|
|
|
url = https://github.com/ocsigen/reactiveData/archive/0.2.tar.gz;
|
|
|
|
sha256 = "0rskcxnyjn8sxqnncdm6rh9wm99nha5m5sc83fywgzs64xfl43fq";
|
2014-10-10 23:33:22 +01:00
|
|
|
};
|
|
|
|
|
2016-05-30 16:36:49 +01:00
|
|
|
buildInputs = [ocaml findlib opam camlp4 ];
|
2014-10-10 23:33:22 +01:00
|
|
|
propagatedBuildInputs = [ocaml_react];
|
|
|
|
|
|
|
|
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
opam-installer --script --prefix=$out reactiveData.install > install.sh
|
|
|
|
sed -i s!lib/reactiveData!lib/ocaml/${ocamlVersion}/site-lib/reactiveData! install.sh
|
|
|
|
sh install.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An OCaml module for functional reactive programming (FRP) based on React";
|
2016-05-30 16:36:49 +01:00
|
|
|
homepage = https://github.com/ocsigen/reactiveData;
|
2014-10-10 23:33:22 +01:00
|
|
|
license = licenses.lgpl21;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-10-10 23:33:22 +01:00
|
|
|
maintainers = with maintainers; [ vbgl ];
|
|
|
|
};
|
|
|
|
}
|