diff --git a/pkgs/development/python-modules/black-macchiato/default.nix b/pkgs/development/python-modules/black-macchiato/default.nix new file mode 100644 index 000000000000..130d07d61ff4 --- /dev/null +++ b/pkgs/development/python-modules/black-macchiato/default.nix @@ -0,0 +1,35 @@ +{ stdenv, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + pytestCheckHook, + black +}: + +buildPythonPackage rec { + pname = "black-macchiato"; + version = "1.3.0"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "wbolster"; + repo = pname; + rev = version; + sha256 = "0lc9w50nlbmlzj44krk7kxcia202fhybbnwfh77xixlc7vb4rayl"; + }; + + propagatedBuildInputs = [ black ]; + + checkInputs = [ pytestCheckHook black ]; + + pythonImportsCheck = [ "black" ]; + + meta = with stdenv.lib; { + description = "This is a small utility built on top of the black Python code formatter to enable formatting of partial files"; + homepage = "https://github.com/wbolster/black-macchiato"; + license = licenses.bsd3; + maintainers = with maintainers; [ jperras ]; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c0846b90fc6..78e00506d785 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10554,6 +10554,8 @@ in black = with python3Packages; toPythonApplication black; + black-macchiato = with python3Packages; toPythonApplication black-macchiato; + blackmagic = callPackage ../development/tools/misc/blackmagic { }; bloaty = callPackage ../development/tools/bloaty { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bae167e20bbd..30e0b3ad0e1b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -842,6 +842,8 @@ in { black = callPackage ../development/python-modules/black { }; + black-macchiato = callPackage ../development/python-modules/black-macchiato { }; + bleach = callPackage ../development/python-modules/bleach { }; bleak = callPackage ../development/python-modules/bleak { };