Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / ufmt / default.nix
blobcc510c0fa76f614377a2bf679f57ec02ad4875c5
1 { lib
2 , black
3 , buildPythonPackage
4 , click
5 , fetchFromGitHub
6 , flit-core
7 , libcst
8 , moreorless
9 , pythonOlder
10 , tomlkit
11 , trailrunner
12 , typing-extensions
13 , unittestCheckHook
14 , usort
17 buildPythonPackage rec {
18   pname = "ufmt";
19   version = "2.1.0";
20   format = "pyproject";
22   disabled = pythonOlder "3.7";
24   src = fetchFromGitHub {
25     owner = "omnilib";
26     repo = "ufmt";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-eQIbSC0Oxi6JD7/3o2y9f+KhT8GIiFiYiV4A3QBoWl0=";
29   };
31   nativeBuildInputs = [
32     flit-core
33   ];
35   propagatedBuildInputs = [
36     black
37     click
38     libcst
39     moreorless
40     tomlkit
41     trailrunner
42     typing-extensions
43     usort
44   ];
46   nativeCheckInputs = [
47     unittestCheckHook
48   ];
50   pythonImportsCheck = [
51     "ufmt"
52   ];
54   meta = with lib; {
55     description = "Safe, atomic formatting with black and usort";
56     homepage = "https://github.com/omnilib/ufmt";
57     changelog = "https://github.com/omnilib/ufmt/blob/${version}/CHANGELOG.md";
58     license = licenses.mit;
59     maintainers = with maintainers; [ fab ];
60   };