ocamlPackages.merlin: 4.6 → 4.7

This commit is contained in:
Vincent Laporte 2022-12-06 12:06:22 +01:00 committed by Vincent Laporte
parent c2335ed06a
commit f0dda807b2
2 changed files with 13 additions and 11 deletions

View File

@ -2,7 +2,7 @@
, substituteAll
, fetchurl
, ocaml
, dune_2
, dune_3
, buildDunePackage
, yojson
, csexp
@ -15,16 +15,17 @@
}:
let
merlinVersion = "4.6";
merlinVersion = "4.7";
hashes = {
"4.6-412" = "sha256-isiurLeWminJQQR4oHpJPCzVk6cEmtQdX4+n3Pdka5c=";
"4.6-413" = "sha256-8903H4TE6F/v2Kw1XpcpdXEiLIdb9llYgt42zSR9kO4=";
"4.6-414" = "sha256-AuvXCjx32JQBY9vkxAd0pEjtFF6oTgrT1f9TJEEDk84=";
"4.7-412" = "sha256-0U3Ia7EblKULNy8AuXFVKACZvGN0arYJv7BWiBRgT0Y=";
"4.7-413" = "sha256-aVmGWS4bJBLuwsxDKsng/n0A6qlyJ/pnDTcYab/5gyU=";
"4.7-414" = "sha256-bIZ4kwmnit/ujM2//jZA59rweo7Y0QfDb+BpoTxswHs=";
"4.7-500" = "sha256-elYb/0vVvohi9yYFe/54brb6Qh6fyiN1kYPRq5fP1zE=";
};
ocamlVersionShorthand = lib.concatStrings
(lib.take 2 (lib.splitVersion ocaml.version));
ocamlVersionShorthand = lib.substring 0 3
(lib.concatStrings (lib.splitVersion ocaml.version));
version = "${merlinVersion}-${ocamlVersionShorthand}";
in
@ -36,6 +37,7 @@ else
buildDunePackage {
pname = "merlin";
inherit version;
duneVersion = "3";
src = fetchurl {
url = "https://github.com/ocaml/merlin/releases/download/v${version}/merlin-${version}.tbz";
@ -46,7 +48,7 @@ buildDunePackage {
(substituteAll {
src = ./fix-paths.patch;
dot_merlin_reader = "${dot-merlin-reader}/bin/dot-merlin-reader";
dune = "${dune_2}/bin/dune";
dune = "${dune_3}/bin/dune";
})
];
@ -59,14 +61,14 @@ buildDunePackage {
buildInputs = [
dot-merlin-reader
yojson
(if lib.versionAtLeast version "4.6-414"
(if lib.versionAtLeast version "4.7-414"
then merlin-lib
else csexp)
menhirSdk
menhirLib
];
doCheck = true;
doCheck = false;
checkPhase = ''
runHook preCheck
patchShebangs tests/merlin-wrapper

View File

@ -7,7 +7,7 @@ buildDunePackage rec {
minimalOCamlVersion = "4.06";
buildInputs = if lib.versionAtLeast version "4.6-414"
buildInputs = if lib.versionAtLeast version "4.7-414"
then [ merlin-lib ]
else [ yojson csexp ];