minimumOCamlVersion and minimalOCamlVersion

What are minimumOCamlVersion and minimalOCamlVersion in nixpkgs? How do they differ?

The manual mentions only minimalOCamlVersion:

It defines an (optional) attribute minimalOCamlVersion that will be used to throw a descriptive evaluation error if building with an older OCaml is attempted.

I think minimumOCamlVersion was considered inaccurate wording at some point (probably there is a discussion about this someone could dig up) and buildDunePackage started accepting both. minimalOCamlVersion is the proper argument and should be used going forwards.

https://github.com/NixOS/nixpkgs/pull/126488

To make the situation clearer, we probably should clean up remaining instances of minimumOCamlVersion and add a deprecation warning for it.

1 Like

It might be worth adding a line in the documentation to warn about the old spelling.

See the PR below for a fix.

https://github.com/NixOS/nixpkgs/pull/155628