mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
ocaml-ng.ocamlPackages{_5_1,}.merlin: fix vim python-3.12 warnings
apply upstream patch 9e0c47b0d5
.patch
to fix syntax warnings from python-3.12 when opening vim.
This commit is contained in:
parent
b729601a9e
commit
9ecab00bf4
2 changed files with 21 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
, fetchpatch
|
||||||
, ocaml
|
, ocaml
|
||||||
, dune_3
|
, dune_3
|
||||||
, buildDunePackage
|
, buildDunePackage
|
||||||
|
@ -56,12 +57,24 @@ buildDunePackage {
|
||||||
sha256 = hashes."${version}";
|
sha256 = hashes."${version}";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = let
|
||||||
|
branch = lib.head (lib.tail (lib.splitString "-" version));
|
||||||
|
needsVimPatch = lib.versionOlder version "4.17" ||
|
||||||
|
branch == "502" && lib.versionOlder version "5.2";
|
||||||
|
in
|
||||||
|
[
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
src = ./fix-paths.patch;
|
src = ./fix-paths.patch;
|
||||||
dot_merlin_reader = "${dot-merlin-reader}/bin/dot-merlin-reader";
|
dot_merlin_reader = "${dot-merlin-reader}/bin/dot-merlin-reader";
|
||||||
dune = "${dune_3}/bin/dune";
|
dune = "${dune_3}/bin/dune";
|
||||||
})
|
})
|
||||||
|
] ++ lib.optionals needsVimPatch [
|
||||||
|
# https://github.com/ocaml/merlin/pull/1798
|
||||||
|
(fetchpatch {
|
||||||
|
name = "vim-python-12-syntax-warning-fix.patch";
|
||||||
|
url = "https://github.com/ocaml/merlin/commit/9e0c47b0d5fd0c4edc37c4c7ce927b155877557d.patch";
|
||||||
|
hash = "sha256-HmdTISE/s45C5cwLgsCHNUW6OAPSsvQ/GcJE6VDEobs=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, fetchurl, buildDunePackage, substituteAll
|
{ lib, fetchurl, fetchpatch, buildDunePackage, substituteAll
|
||||||
, dot-merlin-reader, dune_2, yojson, csexp, result, menhirSdk }:
|
, dot-merlin-reader, dune_2, yojson, csexp, result, menhirSdk }:
|
||||||
|
|
||||||
buildDunePackage rec {
|
buildDunePackage rec {
|
||||||
|
@ -18,6 +18,12 @@ buildDunePackage rec {
|
||||||
dot_merlin_reader = "${dot-merlin-reader}/bin/dot-merlin-reader";
|
dot_merlin_reader = "${dot-merlin-reader}/bin/dot-merlin-reader";
|
||||||
dune = "${dune_2}/bin/dune";
|
dune = "${dune_2}/bin/dune";
|
||||||
})
|
})
|
||||||
|
# https://github.com/ocaml/merlin/pull/1798
|
||||||
|
(fetchpatch {
|
||||||
|
name = "vim-python-12-syntax-warning-fix.patch";
|
||||||
|
url = "https://github.com/ocaml/merlin/commit/9e0c47b0d5fd0c4edc37c4c7ce927b155877557d.patch";
|
||||||
|
hash = "sha256-HmdTISE/s45C5cwLgsCHNUW6OAPSsvQ/GcJE6VDEobs=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue