diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2016-12-04 10:23:48 +0000 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2017-01-13 06:38:09 +0000 |
commit | 7a31f234e1d154ba624aef7df9cda7ad419cc189 (patch) | |
tree | c4e28c2af3a44a4721ff6d13b42829e778fe6b81 /pkgs/development/tools/ocaml | |
parent | 33c2805324061de7658aa959ed6fb2104b76355f (diff) | |
download | nixlib-7a31f234e1d154ba624aef7df9cda7ad419cc189.tar nixlib-7a31f234e1d154ba624aef7df9cda7ad419cc189.tar.gz nixlib-7a31f234e1d154ba624aef7df9cda7ad419cc189.tar.bz2 nixlib-7a31f234e1d154ba624aef7df9cda7ad419cc189.tar.lz nixlib-7a31f234e1d154ba624aef7df9cda7ad419cc189.tar.xz nixlib-7a31f234e1d154ba624aef7df9cda7ad419cc189.tar.zst nixlib-7a31f234e1d154ba624aef7df9cda7ad419cc189.zip |
js_of_ocaml: 2.7 -> 2.8.3
Diffstat (limited to 'pkgs/development/tools/ocaml')
-rw-r--r-- | pkgs/development/tools/ocaml/js_of_ocaml/default.nix | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix index 33a7fe52c394..d88dd9eb8964 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/default.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/default.nix @@ -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 ]; |