ocamlPackages.ocamlformat: disable old versions for OCaml ≥ 5.0
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, callPackage
|
||||
, buildDunePackage
|
||||
, ocaml
|
||||
, re
|
||||
, ocamlformat-lib
|
||||
, menhir
|
||||
@@ -8,13 +9,16 @@
|
||||
}:
|
||||
|
||||
let inherit (callPackage ./generic.nix { inherit version; }) src library_deps;
|
||||
in
|
||||
|
||||
in buildDunePackage {
|
||||
lib.throwIf (lib.versionAtLeast ocaml.version "5.0" && !lib.versionAtLeast version "0.23")
|
||||
"ocamlformat ${version} is not available for OCaml ${ocaml.version}"
|
||||
|
||||
buildDunePackage {
|
||||
pname = "ocamlformat";
|
||||
inherit src version;
|
||||
|
||||
minimalOCamlVersion = "4.08";
|
||||
duneVersion = "3";
|
||||
|
||||
nativeBuildInputs =
|
||||
if lib.versionAtLeast version "0.25.1" then [ ] else [ menhir ];
|
||||
|
||||
Reference in New Issue
Block a user