ocamlPackages.merlin : 2.3.1 -> 2.5.0

For ocaml > 4.02 only
This commit is contained in:
Théophane Hufschmitt 2016-07-20 14:53:33 +02:00
parent 80078966ca
commit 7bb3a04064

View File

@ -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 ]