diff options
-rw-r--r-- | pkgs/development/ocaml-modules/ojquery/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/vg/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/xtmpl/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/js_of_ocaml/3.0.nix | 15 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix | 13 | ||||
-rw-r--r-- | pkgs/development/tools/ocaml/js_of_ocaml/ppx.nix | 14 | ||||
-rw-r--r-- | pkgs/top-level/ocaml-packages.nix | 16 |
7 files changed, 64 insertions, 9 deletions
diff --git a/pkgs/development/ocaml-modules/ojquery/default.nix b/pkgs/development/ocaml-modules/ojquery/default.nix index ec4a6114810..6e9ca15fb38 100644 --- a/pkgs/development/ocaml-modules/ojquery/default.nix +++ b/pkgs/development/ocaml-modules/ojquery/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, ocaml, findlib, ocamlbuild, js_of_ocaml, camlp4 }: +{ stdenv, fetchgit, ocaml, findlib, ocamlbuild, js_of_ocaml, js_of_ocaml-camlp4, camlp4, lwt3, ocaml_react }: stdenv.mkDerivation rec { version = "0.1"; @@ -9,8 +9,8 @@ stdenv.mkDerivation rec { sha256 = "1n01bsk4car40p94fk1ssvww0inqapwwhdylmrb7vv40drsdldp1"; }; - buildInputs = [ ocaml findlib ocamlbuild ]; - propagatedBuildInputs = [ js_of_ocaml camlp4 ]; + buildInputs = [ ocaml findlib ocamlbuild js_of_ocaml-camlp4 camlp4 ]; + propagatedBuildInputs = [ js_of_ocaml lwt3 ocaml_react ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/vg/default.nix b/pkgs/development/ocaml-modules/vg/default.nix index ba33081486d..0ef3ef4939b 100644 --- a/pkgs/development/ocaml-modules/vg/default.nix +++ b/pkgs/development/ocaml-modules/vg/default.nix @@ -1,5 +1,6 @@ { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg -, uchar, result, gg, uutf, otfm, js_of_ocaml, +, uchar, result, gg, uutf, otfm +, js_of_ocaml, js_of_ocaml-ocamlbuild, js_of_ocaml-ppx, pdfBackend ? true, # depends on uutf and otfm htmlcBackend ? true # depends on js_of_ocaml }: @@ -29,7 +30,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ uchar result gg ] ++ optionals pdfBackend [ uutf otfm ] - ++ optionals htmlcBackend [ js_of_ocaml ]; + ++ optionals htmlcBackend [ js_of_ocaml js_of_ocaml-ocamlbuild js_of_ocaml-ppx ]; createFindlibDestdir = true; diff --git a/pkgs/development/ocaml-modules/xtmpl/default.nix b/pkgs/development/ocaml-modules/xtmpl/default.nix index 77569c44bec..0d25b3785fc 100644 --- a/pkgs/development/ocaml-modules/xtmpl/default.nix +++ b/pkgs/development/ocaml-modules/xtmpl/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, ocaml, findlib, uutf, sedlex, ppx_tools, js_of_ocaml -, re }: +, js_of_ocaml-camlp4, camlp4, re }: if stdenv.lib.versionOlder ocaml.version "4.03" then throw "xtmpl not supported for ocaml ${ocaml.version}" @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { sha256 = "1dj5b4b266y4d8q3v1g0xsivz4vkhj0gi0jis37w84xcnlgiik8k"; }; - buildInputs = [ ocaml findlib ppx_tools js_of_ocaml ]; + buildInputs = [ ocaml findlib ppx_tools js_of_ocaml js_of_ocaml-camlp4 camlp4 ]; propagatedBuildInputs = [ sedlex uutf re ]; createFindlibDestdir = true; diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/3.0.nix b/pkgs/development/tools/ocaml/js_of_ocaml/3.0.nix new file mode 100644 index 00000000000..a4852a8aba0 --- /dev/null +++ b/pkgs/development/tools/ocaml/js_of_ocaml/3.0.nix @@ -0,0 +1,15 @@ +{ stdenv, ocaml, findlib, jbuilder, js_of_ocaml-compiler +, ocaml-migrate-parsetree, ppx_tools_versioned, uchar +}: + +stdenv.mkDerivation rec { + name = "js_of_ocaml-${version}"; + + inherit (js_of_ocaml-compiler) version src installPhase meta; + + buildInputs = [ ocaml findlib jbuilder ocaml-migrate-parsetree ppx_tools_versioned ]; + + propagatedBuildInputs = [ js_of_ocaml-compiler uchar ]; + + buildPhase = "jbuilder build -p js_of_ocaml"; +} diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix new file mode 100644 index 00000000000..b3a37e3f760 --- /dev/null +++ b/pkgs/development/tools/ocaml/js_of_ocaml/camlp4.nix @@ -0,0 +1,13 @@ +{ stdenv, ocaml, findlib, jbuilder, js_of_ocaml-compiler +, camlp4 +}: + +stdenv.mkDerivation rec { + name = "js_of_ocaml-camlp4-${version}"; + + inherit (js_of_ocaml-compiler) version src installPhase meta; + + buildInputs = [ ocaml findlib jbuilder camlp4 ]; + + buildPhase = "jbuilder build -p js_of_ocaml-camlp4"; +} diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/ppx.nix b/pkgs/development/tools/ocaml/js_of_ocaml/ppx.nix new file mode 100644 index 00000000000..4f6b281c8b9 --- /dev/null +++ b/pkgs/development/tools/ocaml/js_of_ocaml/ppx.nix @@ -0,0 +1,14 @@ +{ stdenv, ocaml, findlib, jbuilder, js_of_ocaml-compiler +, ocaml-migrate-parsetree, ppx_tools_versioned +, js_of_ocaml +}: + +stdenv.mkDerivation rec { + name = "js_of_ocaml-ppx-${version}"; + + inherit (js_of_ocaml-compiler) version src installPhase meta; + + buildInputs = [ ocaml findlib jbuilder ocaml-migrate-parsetree ppx_tools_versioned js_of_ocaml ]; + + buildPhase = "jbuilder build -p js_of_ocaml-ppx"; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 509d50ce986..ba75adb77d0 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -182,7 +182,10 @@ let eff = callPackage ../development/interpreters/eff { }; - eliom = callPackage ../development/ocaml-modules/eliom { lwt = lwt2; }; + eliom = callPackage ../development/ocaml-modules/eliom { + lwt = lwt2; + js_of_ocaml = js_of_ocaml_2; + }; enumerate = callPackage ../development/ocaml-modules/enumerate { }; @@ -270,12 +273,21 @@ let pcre = ocaml_pcre; }; - js_of_ocaml = callPackage ../development/tools/ocaml/js_of_ocaml { lwt = lwt2; }; + js_of_ocaml = + if lib.versionOlder "4.02" ocaml.version + then callPackage ../development/tools/ocaml/js_of_ocaml/3.0.nix { } + else js_of_ocaml_2; + + js_of_ocaml_2 = callPackage ../development/tools/ocaml/js_of_ocaml { lwt = lwt2; }; + + js_of_ocaml-camlp4 = callPackage ../development/tools/ocaml/js_of_ocaml/camlp4.nix {}; js_of_ocaml-compiler = callPackage ../development/tools/ocaml/js_of_ocaml/compiler.nix {}; js_of_ocaml-ocamlbuild = callPackage ../development/tools/ocaml/js_of_ocaml/ocamlbuild.nix {}; + js_of_ocaml-ppx = callPackage ../development/tools/ocaml/js_of_ocaml/ppx.nix {}; + jsonm = callPackage ../development/ocaml-modules/jsonm { }; lablgl = callPackage ../development/ocaml-modules/lablgl { }; |