2017-07-02 16:22:04 +01:00
|
|
|
{ stdenv, fetchurl, ocaml, findlib, lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4, ocamlbuild
|
2017-06-30 17:38:57 +01:00
|
|
|
, cmdliner, tyxml, reactivedata, cppo, which, base64, uchar, yojson
|
2016-12-04 10:23:48 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let version = if stdenv.lib.versionAtLeast ocaml.version "4.02"
|
2017-06-30 17:38:57 +01:00
|
|
|
then "2.8.4" else "2.7";
|
2016-12-04 10:23:48 +00:00
|
|
|
in
|
2014-05-28 21:04:40 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "js_of_ocaml";
|
|
|
|
inherit version;
|
2014-05-28 21:04:40 +01:00
|
|
|
src = fetchurl {
|
2016-12-04 10:23:48 +00:00
|
|
|
url = "https://github.com/ocsigen/js_of_ocaml/archive/${version}.tar.gz";
|
|
|
|
sha256 = {
|
|
|
|
"2.7" = "1dali1akyd4zmkwav0d957ynxq2jj6cc94r4xiaql7ca89ajz4jj";
|
2017-06-30 17:38:57 +01:00
|
|
|
"2.8.4" = "098ph50s9kqw6rc3qjn39zv9b5swdf4qr44afwqfkkjgjs5d7vbl";
|
2019-08-13 22:52:01 +01:00
|
|
|
}.${version};
|
2016-12-04 10:23:48 +00:00
|
|
|
};
|
2016-01-06 14:13:56 +00:00
|
|
|
|
2017-01-24 21:14:46 +00:00
|
|
|
buildInputs = [ ocaml findlib menhir ocsigen_deriving ocamlbuild
|
2016-12-04 10:23:48 +00:00
|
|
|
cmdliner reactivedata cppo which base64 ]
|
2017-06-30 17:38:57 +01:00
|
|
|
++ stdenv.lib.optionals (stdenv.lib.versionAtLeast ocaml.version "4.02") [ yojson tyxml ];
|
2017-07-02 16:22:04 +01:00
|
|
|
propagatedBuildInputs = [ lwt camlp4 ppx_deriving ]
|
2017-06-30 17:38:57 +01:00
|
|
|
++ stdenv.lib.optional (version == "2.8.4") uchar;
|
2014-05-28 21:04:40 +01:00
|
|
|
|
2016-05-30 16:45:20 +01:00
|
|
|
patches = [ ./Makefile.conf.diff ];
|
2014-05-28 21:04:40 +01:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2014-11-23 11:23:06 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://ocsigen.org/js_of_ocaml/";
|
2014-05-28 21:04:40 +01:00
|
|
|
description = "Compiler of OCaml bytecode to Javascript. It makes it possible to run Ocaml programs in a Web browser";
|
2014-11-23 11:23:06 +00:00
|
|
|
license = licenses.lgpl2;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2014-05-28 21:04:40 +01:00
|
|
|
maintainers = [
|
2014-11-23 11:23:06 +00:00
|
|
|
maintainers.gal_bolle
|
2014-05-28 21:04:40 +01:00
|
|
|
];
|
2017-08-28 10:17:22 +01:00
|
|
|
broken = versionAtLeast ocaml.version "4.05";
|
2014-05-28 21:04:40 +01:00
|
|
|
};
|
|
|
|
}
|