nixpkgs/pkgs/development/tools/ocaml/js_of_ocaml/default.nix

39 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, ocaml, findlib, ocaml_lwt, menhir, ocsigen_deriving, ppx_deriving, camlp4, ocamlbuild
2016-12-04 10:23:48 +00:00
, 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
2014-05-28 21:04:40 +01:00
stdenv.mkDerivation {
2016-12-04 10:23:48 +00:00
name = "js_of_ocaml-${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";
"2.8.3" = "0xrw215w5saqdcdd9ipjhvg8f982z63znsds9ih445s3jr49szm7";
}."${version}";
};
buildInputs = [ ocaml findlib menhir ocsigen_deriving ocamlbuild
2016-12-04 10:23:48 +00:00
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;
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; {
2014-05-28 21:04:40 +01:00
homepage = http://ocsigen.org/js_of_ocaml/;
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;
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
];
};
}