ocamlPackages.ocamlformat-rpc-lib: downgrade for ocaml <= 4.12

required for ocaml-lsp
main
Guillaume Girol 2 years ago
parent c0b6df2b86
commit 761fd7899d
  1. 18
      pkgs/development/ocaml-modules/ocamlformat-rpc-lib/default.nix

@ -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…
Cancel
Save