1{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, pythonAtLeast 2, nose, six, colorama, termstyle }: 3 4buildPythonPackage rec { 5 pname = "rednose"; 6 version = "1.3.0"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "6da77917788be277b70259edc0bb92fc6f28fe268b765b4ea88206cc3543a3e1"; 11 }; 12 13 prePatch = '' 14 substituteInPlace setup.py --replace "six==1.10.0" "six>=1.10.0" 15 ''; 16 17 # Do not test on Python 2 because the tests suite gets stuck 18 # https://github.com/NixOS/nixpkgs/issues/60786 19 # Also macOS tests are broken on python38 20 doCheck = !(isPy27 || (stdenv.isDarwin && pythonAtLeast "3.8")); 21 22 checkInputs = [ six ]; 23 propagatedBuildInputs = [ nose colorama termstyle ]; 24 25 meta = with lib; { 26 description = "A python nose plugin adding color to console results"; 27 homepage = "https://github.com/JBKahn/rednose"; 28 license = licenses.mit; 29 }; 30}