ocamlPackages.js_of_ocaml: 3.11.0 → 4.0.0

ocamlPackages.incr_dom: fix for JSoO 4.0

ocamlPackages.ocsigen-toolkit: 3.1.1 → 3.2.0
This commit is contained in:
Vincent Laporte 2022-04-29 20:43:31 +02:00 committed by Vincent Laporte
parent 9a45461cdf
commit 29d63a169a
5 changed files with 46 additions and 8 deletions

View File

@ -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 {

View File

@ -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) =

View File

@ -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 = {

View File

@ -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 ];

View File

@ -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;
};
}