js_of_ocaml: 2.7 -> 2.8.3

This commit is contained in:
Vincent Laporte 2016-12-04 10:23:48 +00:00
parent 33c2805324
commit 7a31f234e1

View File

@ -1,16 +1,26 @@
{ stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4,
cmdliner, tyxml, reactivedata, cppo, which, base64}:
{ stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4
, cmdliner, tyxml, reactivedata, cppo, which, base64, uchar
}:
let version = if stdenv.lib.versionAtLeast ocaml.version "4.02"
then "2.8.3" else "2.7";
in
stdenv.mkDerivation {
name = "js_of_ocaml-2.7";
name = "js_of_ocaml-${version}";
src = fetchurl {
url = https://github.com/ocsigen/js_of_ocaml/archive/2.7.tar.gz;
sha256 = "1dali1akyd4zmkwav0d957ynxq2jj6cc94r4xiaql7ca89ajz4jj";
};
url = "https://github.com/ocsigen/js_of_ocaml/archive/${version}.tar.gz";
sha256 = {
"2.7" = "1dali1akyd4zmkwav0d957ynxq2jj6cc94r4xiaql7ca89ajz4jj";
"2.8.3" = "0xrw215w5saqdcdd9ipjhvg8f982z63znsds9ih445s3jr49szm7";
}."${version}";
};
buildInputs = [ ocaml findlib menhir ocsigen_deriving
cmdliner tyxml reactivedata cppo which base64];
propagatedBuildInputs = [ ocaml_lwt camlp4 ppx_deriving ];
cmdliner reactivedata cppo which base64 ]
++ stdenv.lib.optional (stdenv.lib.versionAtLeast ocaml.version "4.02") tyxml;
propagatedBuildInputs = [ ocaml_lwt camlp4 ppx_deriving ]
++ stdenv.lib.optional (version == "2.8.3") uchar;
patches = [ ./Makefile.conf.diff ];