Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / usort / default.nix
blob68dbe6a9b7d58d8a68b99c6abf3a9344d8cded73
1 { lib
2 , attrs
3 , buildPythonPackage
4 , click
5 , fetchFromGitHub
6 , hatch-vcs
7 , hatchling
8 , libcst
9 , moreorless
10 , pythonOlder
11 , stdlibs
12 , toml
13 , trailrunner
14 , unittestCheckHook
15 , volatile
18 buildPythonPackage rec {
19   pname = "usort";
20   version = "1.0.7";
21   format = "pyproject";
23   disabled = pythonOlder "3.7";
25   src = fetchFromGitHub {
26     owner = "facebook";
27     repo = "usort";
28     rev = "refs/tags/v${version}";
29     hash = "sha256-emnrghdsUs+VfvYiJExG13SKQNrXAEtGNAJQLScADnw=";
30   };
32   nativeBuildInputs = [
33     hatch-vcs
34     hatchling
35   ];
37   propagatedBuildInputs = [
38     attrs
39     click
40     libcst
41     moreorless
42     stdlibs
43     toml
44     trailrunner
45   ];
47   nativeCheckInputs = [
48     unittestCheckHook
49     volatile
50   ];
52   pythonImportsCheck = [
53     "usort"
54   ];
56   meta = with lib; {
57     description = "Safe, minimal import sorting for Python projects";
58     mainProgram = "usort";
59     homepage = "https://github.com/facebook/usort";
60     changelog = "https://github.com/facebook/usort/blob/${version}/CHANGELOG.md";
61     license = licenses.mit;
62     maintainers = with maintainers; [ fab ];
63   };