1{ stdenv 2, python 3, buildPythonPackage 4, fetchFromGitHub 5, pytest 6, python-utils 7, sphinx 8, coverage 9, execnet 10, flake8 11, pytestpep8 12, pytestflakes 13, pytestcov 14, pytestcache 15, pep8 16, pytestrunner 17}: 18 19buildPythonPackage rec { 20 pname = "progressbar2"; 21 version = "3.12.0"; 22 23 # Use source from GitHub, PyPI is missing tests 24 # https://github.com/WoLpH/python-progressbar/issues/151 25 src = fetchFromGitHub { 26 owner = "WoLpH"; 27 repo = "python-progressbar"; 28 rev = "v${version}"; 29 sha256 = "1gk45sh8cd0kkyvzcvx95z6nlblmyx0x189mjfv3vfa43cr1mb0f"; 30 }; 31 32 propagatedBuildInputs = [ python-utils ]; 33 nativeBuildInputs = [ pytestrunner ]; 34 checkInputs = [ 35 pytest sphinx coverage execnet flake8 pytestpep8 pytestflakes pytestcov 36 pytestcache pep8 37 ]; 38 # ignore tests on the nix wrapped setup.py and don't flake .eggs directory 39 checkPhase = '' 40 runHook preCheck 41 ${python.interpreter} setup.py test --addopts "--ignore=.eggs" 42 runHook postCheck 43 ''; 44 45 meta = with stdenv.lib; { 46 homepage = https://progressbar-2.readthedocs.io/en/latest/; 47 description = "Text progressbar library for python"; 48 license = licenses.bsd3; 49 maintainers = with maintainers; [ ashgillman ]; 50 }; 51}