diff --git a/pkgs/development/tools/ocaml/merlin/default.nix b/pkgs/development/tools/ocaml/merlin/default.nix index 9538d8e1cc2..ed441ea8c10 100644 --- a/pkgs/development/tools/ocaml/merlin/default.nix +++ b/pkgs/development/tools/ocaml/merlin/default.nix @@ -1,9 +1,19 @@ -{ stdenv, fetchzip, ocaml, findlib, yojson, menhir +{ stdenv, fetchzip, ocaml, findlib, yojson, menhir, lib , withEmacsMode ? false, emacs }: assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00"; -let version = "2.3.1"; in +let + version = if lib.versionOlder (lib.getVersion ocaml) "4.02.0" + then + "2.3.1" + else + "2.5.0"; + hashes = { + "2.3.1" = "192jamcc7rmvadlqqsjkzsl6hlgwhg9my1qc89fxh1lmd4qdsrpn"; + "2.5.0" = "1q09mnq4qmh6vfn45qxh2v81l364iazcpjs5dyczmlhln8b25bff"; + }; +in stdenv.mkDerivation { @@ -11,7 +21,7 @@ stdenv.mkDerivation { src = fetchzip { url = "https://github.com/the-lambda-church/merlin/archive/v${version}.tar.gz"; - sha256 = "192jamcc7rmvadlqqsjkzsl6hlgwhg9my1qc89fxh1lmd4qdsrpn"; + sha256 = hashes."${version}"; }; buildInputs = [ ocaml findlib yojson menhir ]