forked from mirrors/nixpkgs
ocamlPackages.ocamlformat-rpc-lib: downgrade for ocaml <= 4.12
required for ocaml-lsp
This commit is contained in:
parent
c0b6df2b86
commit
761fd7899d
|
@ -1,12 +1,24 @@
|
|||
{ lib, fetchurl, buildDunePackage, csexp, sexplib0 }:
|
||||
{ lib, fetchurl, buildDunePackage, ocaml, csexp, sexplib0 }:
|
||||
|
||||
# for compat with ocaml-lsp
|
||||
let source =
|
||||
if lib.versionAtLeast ocaml.version "4.13"
|
||||
then {
|
||||
version = "0.21.0";
|
||||
sha256 = "sha256-KhgX9rxYH/DM6fCqloe4l7AnJuKrdXSe6Y1XY3BXMy0=";
|
||||
} else {
|
||||
version = "0.20.0";
|
||||
sha256 = "sha256-JtmNCgwjbCyUE4bWqdH5Nc2YSit+rekwS43DcviIfgk=";
|
||||
};
|
||||
in
|
||||
|
||||
buildDunePackage rec {
|
||||
pname = "ocamlformat-rpc-lib";
|
||||
version = "0.21.0";
|
||||
inherit (source) version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ocaml-ppx/ocamlformat/releases/download/${version}/ocamlformat-${version}.tbz";
|
||||
sha256 = "sha256-KhgX9rxYH/DM6fCqloe4l7AnJuKrdXSe6Y1XY3BXMy0=";
|
||||
inherit (source) sha256;
|
||||
};
|
||||
|
||||
minimumOCamlVersion = "4.08";
|
||||
|
|
Loading…
Reference in a new issue