From 41d57564703300a5d795b380165d1cd4ee708b97 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Sun, 16 Jul 2023 19:20:08 -0600 Subject: [PATCH] python3Packages.maxminddb: fix build on Darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The multiprocessing tests don’t work on Darwin presumably because it uses the spawn start method instead of fork. Disable those tests to allow maxminddb to build on Darwin again. --- pkgs/development/python-modules/maxminddb/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/maxminddb/default.nix b/pkgs/development/python-modules/maxminddb/default.nix index 90acdef2d363..b5f7fb9d5db0 100644 --- a/pkgs/development/python-modules/maxminddb/default.nix +++ b/pkgs/development/python-modules/maxminddb/default.nix @@ -31,6 +31,10 @@ buildPythonPackage rec { "maxminddb" ]; + # The multiprocessing tests fail on Darwin because multiprocessing uses spawn instead of fork, + # resulting in an exception when it can’t pickle the `lookup` local function. + disabledTests = lib.optionals stdenv.isDarwin [ "multiprocessing" ]; + meta = with lib; { description = "Reader for the MaxMind DB format"; homepage = "https://github.com/maxmind/MaxMind-DB-Reader-python";