diff --git a/pkgs/development/python-modules/protobuf/4.nix b/pkgs/development/python-modules/protobuf/4.nix index d58e21d195a1..2d1a3f9d861f 100644 --- a/pkgs/development/python-modules/protobuf/4.nix +++ b/pkgs/development/python-modules/protobuf/4.nix @@ -4,6 +4,7 @@ fetchpatch, isPyPy, lib, + stdenv, numpy, protobuf, pytestCheckHook, @@ -84,15 +85,21 @@ buildPythonPackage { pytestCheckHook ] ++ lib.optionals (lib.versionAtLeast protobuf.version "22") [ numpy ]; - disabledTests = lib.optionals isPyPy [ - # error message differs - "testInvalidTimestamp" - # requires tracemalloc which pypy does not implement - # https://foss.heptapod.net/pypy/pypy/-/issues/3048 - "testUnknownFieldsNoMemoryLeak" - # assertion is not raised for some reason - "testStrictUtf8Check" - ]; + disabledTests = + lib.optionals isPyPy [ + # error message differs + "testInvalidTimestamp" + # requires tracemalloc which pypy does not implement + # https://foss.heptapod.net/pypy/pypy/-/issues/3048 + "testUnknownFieldsNoMemoryLeak" + # assertion is not raised for some reason + "testStrictUtf8Check" + ] + ++ lib.optionals stdenv.hostPlatform.is32bit [ + # OverflowError: timestamp out of range for platform time_t + "testTimezoneAwareDatetimeConversionWhereTimestampLosesPrecision" + "testTimezoneNaiveDatetimeConversionWhereTimestampLosesPrecision" + ]; disabledTestPaths = lib.optionals (lib.versionAtLeast protobuf.version "23") [