From 7bb3a04064c622628876a984531aa72c3f904152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophane=20Hufschmitt?= Date: Wed, 20 Jul 2016 14:53:33 +0200 Subject: [PATCH] ocamlPackages.merlin : 2.3.1 -> 2.5.0 For ocaml > 4.02 only --- pkgs/development/tools/ocaml/merlin/default.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/ocaml/merlin/default.nix b/pkgs/development/tools/ocaml/merlin/default.nix index 9538d8e1cc21..ed441ea8c10b 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 ]