Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv 2, python 3, buildPythonPackage 4, fetchPypi 5, pytest 6, python-utils 7, sphinx 8, flake8 9, pytestpep8 10, pytest-flakes 11, pytestcov 12, pytestcache 13, pytestrunner 14, freezegun 15}: 16 17buildPythonPackage rec { 18 pname = "progressbar2"; 19 version = "3.39.2"; 20 21 src = fetchPypi { 22 inherit pname version; 23 sha256 = "6eb5135b987caca4212d2c7abc2923d4ad5ba18bb34ccbe7044b3628f52efc2c"; 24 }; 25 26 postPatch = '' 27 rm -r tests/__pycache__ 28 rm tests/*.pyc 29 ''; 30 31 propagatedBuildInputs = [ python-utils ]; 32 nativeBuildInputs = [ pytestrunner ]; 33 checkInputs = [ 34 pytest sphinx flake8 pytestpep8 pytest-flakes pytestcov 35 pytestcache freezegun 36 ]; 37 # ignore tests on the nix wrapped setup.py and don't flake .eggs directory 38 checkPhase = '' 39 runHook preCheck 40 ${python.interpreter} setup.py test --addopts "--ignore=.eggs" 41 runHook postCheck 42 ''; 43 44 meta = with stdenv.lib; { 45 homepage = https://progressbar-2.readthedocs.io/en/latest/; 46 description = "Text progressbar library for python"; 47 license = licenses.bsd3; 48 maintainers = with maintainers; [ ashgillman ]; 49 }; 50}