ocamlPackages.ocamlformat: disable old versions for OCaml ≥ 5.0
This commit is contained in:
parent
428862de06
commit
778e5e8802
1 changed files with 6 additions and 2 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Reference in a new issue