Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.0 kB view raw
1{ stdenv, buildPythonPackage, fetchPypi, pythonOlder 2, attrs, click, toml, appdirs, aiohttp 3, glibcLocales, pytest }: 4 5buildPythonPackage rec { 6 pname = "black"; 7 version = "18.9b0"; 8 9 disabled = pythonOlder "3.6"; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "1992ramdwv8sg4mbl5ajirwj5i4a48zjgsycib0fnbaliyiajc70"; 14 }; 15 16 checkInputs = [ pytest glibcLocales ]; 17 18 # Don't know why these tests fails 19 checkPhase = '' 20 LC_ALL="en_US.UTF-8" pytest \ 21 --deselect tests/test_black.py::BlackTestCase::test_expression_diff \ 22 --deselect tests/test_black.py::BlackTestCase::test_cache_multiple_files \ 23 --deselect tests/test_black.py::BlackTestCase::test_failed_formatting_does_not_get_cached 24 ''; 25 26 propagatedBuildInputs = [ attrs appdirs click toml aiohttp ]; 27 28 meta = with stdenv.lib; { 29 description = "The uncompromising Python code formatter"; 30 homepage = https://github.com/ambv/black; 31 license = licenses.mit; 32 maintainers = with maintainers; [ sveitser ]; 33 }; 34 35}