diff --git a/pkgs/development/ocaml-modules/janestreet/0.14.nix b/pkgs/development/ocaml-modules/janestreet/0.14.nix index 800b1c1e531..cee30da45c9 100644 --- a/pkgs/development/ocaml-modules/janestreet/0.14.nix +++ b/pkgs/development/ocaml-modules/janestreet/0.14.nix @@ -313,6 +313,7 @@ with self; meta.description = "A library for building dynamic webapps, using Js_of_ocaml"; buildInputs = [ js_of_ocaml-ppx ]; propagatedBuildInputs = [ async_js incr_map incr_select virtual_dom ]; + patches = [ ./incr_dom_jsoo_4_0.patch ]; }; incr_map = janePackage { diff --git a/pkgs/development/ocaml-modules/janestreet/incr_dom_jsoo_4_0.patch b/pkgs/development/ocaml-modules/janestreet/incr_dom_jsoo_4_0.patch new file mode 100644 index 00000000000..4e7a45ce96d --- /dev/null +++ b/pkgs/development/ocaml-modules/janestreet/incr_dom_jsoo_4_0.patch @@ -0,0 +1,24 @@ +diff --git a/src/js_misc.ml b/src/js_misc.ml +index 65f7b44..bfef103 100644 +--- a/src/js_misc.ml ++++ b/src/js_misc.ml +@@ -28,17 +28,11 @@ type rows_or_columns = + [@@deriving sexp, bin_io, variants, compare] + + let innerHeight () = +- Js.Optdef.case +- Dom_html.window##.innerHeight +- (fun () -> Dom_html.document##.documentElement##.clientHeight) +- Fn.id ++ Dom_html.window##.innerHeight + ;; + + let innerWidth () = +- Js.Optdef.case +- Dom_html.window##.innerWidth +- (fun () -> Dom_html.document##.documentElement##.clientWidth) +- Fn.id ++ Dom_html.window##.innerWidth + ;; + + let element_is_in_viewport (elt : Dom_html.element Js.t) = diff --git a/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix b/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix index 12a92c5be39..60a07d30d05 100644 --- a/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { pname = "ocsigen-toolkit"; name = "ocaml${ocaml.version}-${pname}-${version}"; - version = "3.1.1"; + version = "3.2.0"; propagatedBuildInputs = [ calendar js_of_ocaml-ppx_deriving_json eliom ]; nativeBuildInputs = [ ocaml findlib opaline eliom ]; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { owner = "ocsigen"; repo = pname; rev = version; - sha256 = "sha256:1fm0vvccmjib9yj5m2760vhzb4z3392swlprp51az53g3vk4q218"; + sha256 = "sha256:13n0y8a80bl94la4lnp9dr2x7b8plhm17g9zgf0l6x42g3886pw7"; }; meta = { diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix index 82d84c819dd..7805ca26403 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/compiler.nix @@ -5,12 +5,12 @@ buildDunePackage rec { pname = "js_of_ocaml-compiler"; - version = "3.11.0"; + version = "4.0.0"; useDune2 = true; src = fetchurl { url = "https://github.com/ocsigen/js_of_ocaml/releases/download/${version}/js_of_ocaml-${version}.tbz"; - sha256 = "sha256:0flws9mw0yjfw4d8d3y3k408mivy2xgky70xk1br3iqs4zksz38m"; + sha256 = "sha256:0pj9jjrmi0xxrzmygv4b5whsibw1jxy3wgibmws85x5jwlczh0nz"; }; nativeBuildInputs = [ menhir ]; diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix b/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix index c67d05c1503..fa9ff95b0fd 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/ocamlbuild.nix @@ -1,13 +1,26 @@ -{ buildDunePackage, js_of_ocaml-compiler +{ lib, buildDunePackage, fetchFromGitHub , ocamlbuild }: -buildDunePackage { +buildDunePackage rec { pname = "js_of_ocaml-ocamlbuild"; - - inherit (js_of_ocaml-compiler) version src meta useDune2; + version = "4.0.0"; minimalOCamlVersion = "4.02"; + src = fetchFromGitHub { + owner = "ocsigen"; + repo = pname; + rev = "852302c8f35b946e2ec275c529a79e46d8749be6"; + sha256 = "sha256:03ayvakvbh4wi4dwcgd7r9y8ka8cv3d59hb81yk2dxyd94bln145"; + }; + propagatedBuildInputs = [ ocamlbuild ]; + + meta = { + description = "An ocamlbuild plugin to compile to JavaScript"; + license = lib.licenses.lgpl2Only; + maintainers = [ lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + }; }