Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.11 30 lines 994 B view raw
1{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, react, opaline }: 2 3if !lib.versionAtLeast ocaml.version "4.04" 4then throw "reactiveData is not available for OCaml ${ocaml.version}" 5else 6 7stdenv.mkDerivation rec { 8 pname = "ocaml${ocaml.version}-reactiveData"; 9 version = "0.2.2"; 10 11 src = fetchurl { 12 url = "https://github.com/ocsigen/reactiveData/archive/${version}.tar.gz"; 13 sha256 = "0jzagyp4zla28wykvcgqwd8df71ir0vb4s8akp02cfacd5v86sng"; 14 }; 15 16 buildInputs = [ ocaml findlib ocamlbuild opaline ]; 17 propagatedBuildInputs = [ react ]; 18 19 buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; 20 21 installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR"; 22 23 meta = with lib; { 24 description = "An OCaml module for functional reactive programming (FRP) based on React"; 25 homepage = "https://github.com/ocsigen/reactiveData"; 26 license = licenses.lgpl21; 27 platforms = ocaml.meta.platforms or [ ]; 28 maintainers = with maintainers; [ vbgl ]; 29 }; 30}