Files
nixpkgs/pkgs/development/python-modules/black-macchiato/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

47 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
black,
fetchpatch,
}:
buildPythonPackage rec {
pname = "black-macchiato";
version = "1.3.0";
format = "setuptools";
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 ];
};
}