7412dc5fae
* Add aiohttp to dependencies, because `blackd` requires it. * Fix darwin build.
35 lines
1 KiB
Nix
35 lines
1 KiB
Nix
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
|
|
, attrs, click, toml, appdirs, aiohttp
|
|
, glibcLocales, pytest }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "black";
|
|
version = "18.9b0";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "1992ramdwv8sg4mbl5ajirwj5i4a48zjgsycib0fnbaliyiajc70";
|
|
};
|
|
|
|
checkInputs = [ pytest glibcLocales ];
|
|
|
|
# Don't know why these tests fails
|
|
checkPhase = ''
|
|
LC_ALL="en_US.UTF-8" pytest \
|
|
--deselect tests/test_black.py::BlackTestCase::test_expression_diff \
|
|
--deselect tests/test_black.py::BlackTestCase::test_cache_multiple_files \
|
|
--deselect tests/test_black.py::BlackTestCase::test_failed_formatting_does_not_get_cached
|
|
'';
|
|
|
|
propagatedBuildInputs = [ attrs appdirs click toml aiohttp ];
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "The uncompromising Python code formatter";
|
|
homepage = https://github.com/ambv/black;
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ sveitser ];
|
|
};
|
|
|
|
}
|