Files
Guy Chronister dfe9e8f337 dfmt: migrate to pyproject build
The package now uses pyproject format instead of setuptools, with poetry-core as the build system. The build configuration has been updated to replace the deprecated poetry.masonry.api backend with poetry.core.masonry.api.

dfmt: add tests to dfmt

dfmt: Use poetry-core
2026-02-12 10:44:40 -06:00

35 lines
781 B
Nix

{
lib,
python3Packages,
fetchPypi,
}:
python3Packages.buildPythonApplication (finalAttrs: {
pname = "dfmt";
version = "1.2.0";
pyproject = true;
build-system = [
python3Packages.poetry-core
];
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-evY2DKjVVvHP6CuX8DuNHqWp1t4fowGCkMhEtlZtnW4=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'poetry.masonry.api' 'poetry.core.masonry.api' \
--replace-fail 'poetry>=' 'poetry-core>=' \
'';
meta = {
description = "Format paragraphs, comments and doc strings";
mainProgram = "dfmt";
homepage = "https://github.com/dmerejkowsky/dfmt";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ cole-h ];
};
})