treewide: use ocaml.version (#19192)

This commit is contained in:
Kirill Boltaev
2016-10-05 09:32:30 +02:00
committed by vbgl
parent 916364af72
commit 3e646865f4
49 changed files with 170 additions and 287 deletions
@@ -1,15 +1,12 @@
{ stdenv, fetchzip, which, cryptopp, ocaml, findlib, ocaml_react, ocaml_ssl, libev, pkgconfig, ncurses, ocaml_oasis, ocaml_text, glib, camlp4, ppx_tools }:
let
version = "2.5.2";
inherit (stdenv.lib) optional getVersion versionAtLeast;
ocaml_version = getVersion ocaml;
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "ocaml-lwt-${version}";
version = "2.5.2";
src = fetchzip {
url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz";
@@ -21,7 +18,7 @@ stdenv.mkDerivation {
propagatedBuildInputs = [ ocaml_react ocaml_ssl ocaml_text libev ];
configureFlags = [ "--enable-glib" "--enable-ssl" "--enable-react" "--enable-camlp4"]
++ [ (if versionAtLeast ocaml_version "4.02" then "--enable-ppx" else "--disable-ppx") ];
++ [ (if versionAtLeast ocaml.version "4.02" then "--enable-ppx" else "--disable-ppx") ];
createFindlibDestdir = true;