mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
c47912b4a1
Diff: https://github.com/omnilib/ufmt/compare/refs/tags/v2.7.3...v2.8.0 Changelog: https://github.com/omnilib/ufmt/blob/2.8.0/CHANGELOG.md
67 lines
1.2 KiB
Nix
67 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
black,
|
|
buildPythonPackage,
|
|
click,
|
|
fetchFromGitHub,
|
|
flit-core,
|
|
libcst,
|
|
moreorless,
|
|
pygls,
|
|
pythonOlder,
|
|
tomlkit,
|
|
trailrunner,
|
|
ruff-api,
|
|
typing-extensions,
|
|
unittestCheckHook,
|
|
usort,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ufmt";
|
|
version = "2.8.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "omnilib";
|
|
repo = "ufmt";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-oEvvXUju7qne3pCwnrckplMs0kBJavB669qieXJZPKw=";
|
|
};
|
|
|
|
build-system = [ flit-core ];
|
|
|
|
dependencies = [
|
|
black
|
|
click
|
|
libcst
|
|
moreorless
|
|
tomlkit
|
|
trailrunner
|
|
typing-extensions
|
|
usort
|
|
];
|
|
|
|
optional-dependencies = {
|
|
lsp = [ pygls ];
|
|
ruff = [ ruff-api ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
unittestCheckHook
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
|
|
|
pythonImportsCheck = [ "ufmt" ];
|
|
|
|
meta = with lib; {
|
|
description = "Safe, atomic formatting with black and usort";
|
|
homepage = "https://github.com/omnilib/ufmt";
|
|
changelog = "https://github.com/omnilib/ufmt/blob/${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
mainProgram = "ufmt";
|
|
};
|
|
}
|