Merge pull request #43535 from vbgl/ocaml-js_of_ocaml-3.2.0

ocamlPackages.js_of_ocaml: 3.1.0 -> 3.2.0
This commit is contained in:
Vincent Laporte 2018-07-21 06:21:37 +00:00 committed by GitHub
commit df6534d04a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 23 deletions

View File

@ -1,8 +1,8 @@
{ stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg }: { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
buildOcaml rec { stdenv.mkDerivation rec {
version = "0.8.3"; version = "0.8.3";
name = "astring"; name = "ocaml${ocaml.version}-astring-${version}";
src = fetchurl { src = fetchurl {
url = "http://erratique.ch/software/astring/releases/astring-${version}.tbz"; url = "http://erratique.ch/software/astring/releases/astring-${version}.tbz";

View File

@ -1,9 +1,9 @@
{ stdenv, buildOcaml, fetchurl, ocamlbuild, findlib { stdenv, fetchurl, ocaml, ocamlbuild, findlib
, jbuilder, sexplib, ppx_sexp_conv , jbuilder, sexplib, ppx_sexp_conv
}: }:
buildOcaml rec { stdenv.mkDerivation rec {
name = "ipaddr"; name = "ocaml${ocaml.version}-ipaddr-${version}";
version = "2.8.0"; version = "2.8.0";
src = fetchurl { src = fetchurl {
@ -11,7 +11,7 @@ buildOcaml rec {
sha256 = "1amb1pbm9ybpxy6190qygpj6nmbzzs2r6vx4xh5r6v89szx9rfxw"; sha256 = "1amb1pbm9ybpxy6190qygpj6nmbzzs2r6vx4xh5r6v89szx9rfxw";
}; };
buildInputs = [ findlib ocamlbuild jbuilder ]; buildInputs = [ ocaml findlib ocamlbuild jbuilder ];
propagatedBuildInputs = [ ppx_sexp_conv sexplib ]; propagatedBuildInputs = [ ppx_sexp_conv sexplib ];
inherit (jbuilder) installPhase; inherit (jbuilder) installPhase;

View File

@ -1,7 +1,11 @@
{ stdenv, buildOcaml, ocaml, fetchzip { stdenv, ocaml, findlib, ocamlbuild, fetchzip
, cppo, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree , cppo, ppx_tools, ppx_derivers, result, ounit, ocaml-migrate-parsetree
}: }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "ppx_deriving is not available for OCaml ${ocaml.version}"
else
let param = let param =
if ocaml.version == "4.03.0" if ocaml.version == "4.03.0"
then { then {
@ -14,23 +18,21 @@ let param =
extraPropagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ]; extraPropagatedBuildInputs = [ ocaml-migrate-parsetree ppx_derivers ];
}; in }; in
buildOcaml rec { stdenv.mkDerivation rec {
name = "ppx_deriving"; name = "ocaml${ocaml.version}-ppx_deriving-${version}";
inherit (param) version; inherit (param) version;
minimumSupportedOcamlVersion = "4.02";
src = fetchzip { src = fetchzip {
url = "https://github.com/whitequark/${name}/archive/v${version}.tar.gz"; url = "https://github.com/ocaml-ppx/ppx_deriving/archive/v${version}.tar.gz";
inherit (param) sha256; inherit (param) sha256;
}; };
hasSharedObjects = true; buildInputs = [ ocaml findlib ocamlbuild cppo ounit ];
buildInputs = [ cppo ounit ];
propagatedBuildInputs = param.extraPropagatedBuildInputs ++ propagatedBuildInputs = param.extraPropagatedBuildInputs ++
[ ppx_tools result ]; [ ppx_tools result ];
createFindlibDestdir = true;
installPhase = "OCAMLPATH=$OCAMLPATH:`ocamlfind printconf destdir` make install"; installPhase = "OCAMLPATH=$OCAMLPATH:`ocamlfind printconf destdir` make install";
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -17,6 +17,9 @@ let param = {
"4.06" = { "4.06" = {
version = "5.1+4.06.0"; version = "5.1+4.06.0";
sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; }; sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; };
"4.07" = {
version = "5.1+4.06.0";
sha256 = "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"; };
}."${ocaml.meta.branch}"; }."${ocaml.meta.branch}";
in in
stdenv.mkDerivation { stdenv.mkDerivation {

View File

@ -1,4 +1,6 @@
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, camlp4, uutf, markup, ppx_tools_versioned, re { stdenv, fetchzip, ocaml, findlib, ocamlbuild, uutf, markup, ppx_tools_versioned, re
, withP4 ? !stdenv.lib.versionAtLeast ocaml.version "4.07"
, camlp4 ? null
}: }:
assert stdenv.lib.versionAtLeast ocaml.version "4.02"; assert stdenv.lib.versionAtLeast ocaml.version "4.02";
@ -13,13 +15,14 @@ stdenv.mkDerivation rec {
sha256 = "1zrkrmxyj5a2cdh4b9zr9anwfk320wv3x0ynxnyxl5za2ix8sld8"; sha256 = "1zrkrmxyj5a2cdh4b9zr9anwfk320wv3x0ynxnyxl5za2ix8sld8";
}; };
buildInputs = [ ocaml findlib ocamlbuild camlp4 ppx_tools_versioned markup ]; buildInputs = [ ocaml findlib ocamlbuild ppx_tools_versioned markup ]
++ stdenv.lib.optional withP4 camlp4;
propagatedBuildInputs = [ uutf re ]; propagatedBuildInputs = [ uutf re ];
createFindlibDestdir = true; createFindlibDestdir = true;
configureFlags = "--enable-syntax"; configureFlags = stdenv.lib.optional withP4 "--enable-syntax";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://ocsigen.org/tyxml/; homepage = http://ocsigen.org/tyxml/;

View File

@ -8,13 +8,13 @@ else
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "js_of_ocaml-compiler-${version}"; name = "js_of_ocaml-compiler-${version}";
version = "3.1.0"; version = "3.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ocsigen"; owner = "ocsigen";
repo = "js_of_ocaml"; repo = "js_of_ocaml";
rev = version; rev = version;
sha256 = "17a0kb39bcx2qq41cq7kjrxghm67l1yahrs47yakgb1avna0pqd9"; sha256 = "0dxxdxgrbg9xvvi3i627krnk6rb1ja0ypp2diwdkpnmy45wak9lv";
}; };
buildInputs = [ ocaml findlib jbuilder cmdliner cppo ]; buildInputs = [ ocaml findlib jbuilder cmdliner cppo ];

View File

@ -1,6 +1,6 @@
{ stdenv, ocaml, findlib, jbuilder, js_of_ocaml-compiler, js_of_ocaml-ppx { stdenv, ocaml, findlib, jbuilder, js_of_ocaml-compiler, js_of_ocaml-ppx
, ocaml-migrate-parsetree, ppx_tools_versioned , ocaml-migrate-parsetree, ppx_tools_versioned
, js_of_ocaml, ocaml_lwt , js_of_ocaml, ocaml_lwt, lwt_log
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ocaml findlib jbuilder js_of_ocaml-ppx ocaml-migrate-parsetree ppx_tools_versioned ]; buildInputs = [ ocaml findlib jbuilder js_of_ocaml-ppx ocaml-migrate-parsetree ppx_tools_versioned ];
propagatedBuildInputs = [ js_of_ocaml ocaml_lwt ]; propagatedBuildInputs = [ js_of_ocaml ocaml_lwt lwt_log ];
buildPhase = "jbuilder build -p js_of_ocaml-lwt"; buildPhase = "jbuilder build -p js_of_ocaml-lwt";
} }