From daef4faf187913c17b5bd74fee9d54a570fb79ec Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Thu, 24 Feb 2022 10:15:45 -0800 Subject: [PATCH] python3Packages.uvloop: fix tests on Darwin --- pkgs/development/python-modules/uvloop/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/uvloop/default.nix b/pkgs/development/python-modules/uvloop/default.nix index 72ede5dc1716..b4b75dbb1941 100644 --- a/pkgs/development/python-modules/uvloop/default.nix +++ b/pkgs/development/python-modules/uvloop/default.nix @@ -62,8 +62,12 @@ buildPythonPackage rec { "tests/test_sourcecode.py" ]; - # force using installed/compiled uvloop vs source by moving tests to temp dir - preCheck = '' + preCheck = lib.optionalString stdenv.isDarwin '' + # Work around "OSError: AF_UNIX path too long" + # https://github.com/MagicStack/uvloop/issues/463 + export TMPDIR="/tmp" + '' + '' + # force using installed/compiled uvloop vs source by moving tests to temp dir export TEST_DIR=$(mktemp -d) cp -r tests $TEST_DIR pushd $TEST_DIR