anchor.diff:      # The top directory /build matches black's DEFAULT_EXCLUDE regex.
       # Make /build the project root for black tests to avoid excluding files.
       touch ../.git
  +  '' + lib.optionalString stdenv.isDarwin ''
  +    # Work around https://github.com/psf/black/issues/2105
  +    export TMPDIR="/tmp"
     '';
   
     disabledTests = [
  
positive.code: , regex
  , toml
  , typed-ast
  , typing-extensions }:
  
  buildPythonPackage rec {
    pname = "black";
    version = "21.5b1";
  
    disabled = pythonOlder "3.6";
  
    src = fetchPypi {
      inherit pname version;
      sha256 = "1cdkrl5vw26iy7s23v2zpr39m6g5xsgxhfhagzzflgfbvdc56s93";
    };
  
    nativeBuildInputs = [ setuptools-scm ];
  
negative.code:     appdirs
      attrs
      click
      colorama
      mypy-extensions
      pathspec
      regex
      toml
      typed-ast # required for tests and python2 extra
      uvloop
    ] ++ lib.optional (pythonOlder "3.7") dataclasses
      ++ lib.optional (pythonOlder "3.8") typing-extensions;
  
    meta = with lib; {
      description = "The uncompromising Python code formatter";
      homepage = "https://github.com/psf/black";
      changelog = "https://github.com/psf/black/blob/${version}/CHANGES.md";
      license = licenses.mit;
      maintainers = with maintainers; [ sveitser ];
    };
  }
  