nixpkgs/pkgs/by-name/df/dfmt/package.nix
Martin Weinelt ae4a1a485a
treewide: add explicit format attribute for Python packages
If a Python package does not come with either `format` or `pyproject` we
consider it a setuptools build, that calls `setup.py` directly, which is
deprecated.

This change, as a first step, migrates a large chunk of these packages to
set setuptools as their explicit format

This is so we can unify the problem space for the next step of the
migration.
2025-07-02 05:56:47 +02:00

32 lines
629 B
Nix

{
lib,
python3,
fetchPypi,
}:
let
inherit (python3.pkgs)
buildPythonApplication
pythonOlder
;
in
buildPythonApplication rec {
pname = "dfmt";
version = "1.2.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "7af6360ca8d556f1cfe82b97f03b8d1ea5a9d6de1fa3018290c844b6566d9d6e";
};
meta = with lib; {
description = "Format paragraphs, comments and doc strings";
mainProgram = "dfmt";
homepage = "https://github.com/dmerejkowsky/dfmt";
license = licenses.bsd3;
maintainers = with maintainers; [ cole-h ];
};
}