about summary refs log tree commit diff
path: root/pkgs/development/interpreters/python
diff options
context:
space:
mode:
authorAlexandre Macabies <web+oss@zopieux.com>2023-11-25 13:38:39 +0100
committerAlexandre Macabies <web+oss@zopieux.com>2023-11-25 13:38:39 +0100
commitfc235bb0fcb324cbce510f4cf1e1e51a6615a195 (patch)
treee9a602c8a3d129432834800e8a5e02708e78c46e /pkgs/development/interpreters/python
parent55103bf2a827e34e82ca105864a2cf52ac29b0a4 (diff)
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>
Diffstat (limited to 'pkgs/development/interpreters/python')
-rw-r--r--pkgs/development/interpreters/python/hooks/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix
index 0a4600b9d6c39..35116b38f8104 100644
--- a/pkgs/development/interpreters/python/hooks/default.nix
+++ b/pkgs/development/interpreters/python/hooks/default.nix
@@ -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