python/hooks: use python.pythonVersion to support PyPy

f292ef4 introduced a check for the Python version but uses `.version`,
which isn't friendly to other Pythons like PyPy which use versions
strings like 7.3, failing the >=3.10 check.

Using `.pythonVersion` fixes this check.

Co-authored-by: Pierre Bourdon <delroth@gmail.com>
This commit is contained in:
Alexandre Macabies 2023-11-25 13:38:39 +01:00
parent 55103bf2a8
commit fc235bb0fc

View file

@ -107,7 +107,7 @@ in {
makePythonHook {
name = "python-catch-conflicts-hook";
substitutions = let
useLegacyHook = lib.versionOlder python.version "3.10";
useLegacyHook = lib.versionOlder python.pythonVersion "3.10";
in {
inherit pythonInterpreter pythonSitePackages;
catchConflicts = if useLegacyHook then