2018-07-23 16:45:58 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
|
|
|
|
, attrs, click, toml, appdirs
|
|
|
|
, glibcLocales, pytest }:
|
2018-04-05 08:11:53 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "black";
|
2018-10-06 14:19:38 +01:00
|
|
|
version = "18.9b0";
|
2018-04-05 08:11:53 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-10-06 14:19:38 +01:00
|
|
|
sha256 = "1992ramdwv8sg4mbl5ajirwj5i4a48zjgsycib0fnbaliyiajc70";
|
2018-04-05 08:11:53 +01:00
|
|
|
};
|
|
|
|
|
2018-07-23 16:45:58 +01:00
|
|
|
checkInputs = [ pytest glibcLocales ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
# no idea, why those fail.
|
|
|
|
LC_ALL="en_US.UTF-8" HOME="$NIX_BUILD_TOP" \
|
|
|
|
pytest \
|
|
|
|
-k "not test_cache_multiple_files and not test_failed_formatting_does_not_get_cached"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ attrs appdirs click toml ];
|
2018-04-05 08:11:53 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "The uncompromising Python code formatter";
|
|
|
|
homepage = https://github.com/ambv/black;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ sveitser ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|