From fe5f82fd99b6cc4bb5c92d5fbce5aaaef539375f Mon Sep 17 00:00:00 2001 From: Keshav Kini Date: Thu, 10 Dec 2020 18:20:58 -0800 Subject: [PATCH] python36Packages.black: fix broken dependency In PR #96456, black was upgraded from 19.10b0 to 20.8b1. This new version of black depends on the dataclasses module, but that was only introduced into the standard library in Python 3.7; earlier versions of Python require the backport package of the same name. This commit addresses the missing dependency. --- pkgs/development/python-modules/black/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/black/default.nix b/pkgs/development/python-modules/black/default.nix index f0a25dfb0b1..3346afbb4ab 100644 --- a/pkgs/development/python-modules/black/default.nix +++ b/pkgs/development/python-modules/black/default.nix @@ -5,6 +5,7 @@ , appdirs , attrs , click +, dataclasses , mypy-extensions , pathspec , regex @@ -59,7 +60,7 @@ buildPythonPackage rec { toml typed-ast typing-extensions - ]; + ] ++ lib.optional (pythonOlder "3.7") dataclasses; meta = with lib; { description = "The uncompromising Python code formatter";