treewide: use ocaml.version (#19192)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user