From 838310b2addd62ffa5f4aaaba1d9cd82ff329169 Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Mon, 6 Dec 2021 12:54:12 -0800 Subject: [PATCH] pythonPackages.nose-randomly: fix tests on Darwin --- pkgs/development/python-modules/nose-randomly/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/nose-randomly/default.nix b/pkgs/development/python-modules/nose-randomly/default.nix index eb75a375d7701..09e827d53a5f2 100644 --- a/pkgs/development/python-modules/nose-randomly/default.nix +++ b/pkgs/development/python-modules/nose-randomly/default.nix @@ -1,4 +1,5 @@ { lib +, stdenv , buildPythonPackage , fetchPypi , nose @@ -16,9 +17,10 @@ buildPythonPackage rec { checkInputs = [ numpy nose ]; - checkPhase = '' - nosetests - ''; + checkPhase = if stdenv.isDarwin then '' + # Work around "OSError: AF_UNIX path too long" + TMPDIR="/tmp" nosetests + '' else "nosetests"; meta = with lib; { description = "Nose plugin to randomly order tests and control random.seed";