Files
nixpkgs/pkgs/development/python-modules/black-macchiato/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

50 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
pytestCheckHook,
black,
fetchpatch,
}:
buildPythonPackage rec {
pname = "black-macchiato";
version = "1.3.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "wbolster";
repo = "black-macchiato";
rev = version;
sha256 = "0lc9w50nlbmlzj44krk7kxcia202fhybbnwfh77xixlc7vb4rayl";
};
patches = [
# fix empty multi-line string test
(fetchpatch {
url = "https://github.com/wbolster/black-macchiato/commit/d3243a1c95b5029b3ffa12417f0c587a2ba79bcd.patch";
hash = "sha256-3m8U6c+1UCRy/Fkq6lk9LhwrFyE+q3GD2jnMA7N4ZJs=";
})
];
propagatedBuildInputs = [ black ];
nativeCheckInputs = [
pytestCheckHook
black
];
pythonImportsCheck = [ "black" ];
meta = {
description = "This is a small utility built on top of the black Python code formatter to enable formatting of partial files";
mainProgram = "black-macchiato";
homepage = "https://github.com/wbolster/black-macchiato";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ jperras ];
};
}