Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / usort / default.nix
blobd8369260587e36550d0f5b9c714fba1e58fc921c
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   SETUPTOOLS_SCM_PRETEND_VERSION = version;
34   nativeBuildInputs = [
35     hatch-vcs
36     hatchling
37   ];
39   propagatedBuildInputs = [
40     attrs
41     click
42     libcst
43     moreorless
44     stdlibs
45     toml
46     trailrunner
47   ];
49   nativeCheckInputs = [
50     unittestCheckHook
51     volatile
52   ];
54   pythonImportsCheck = [
55     "usort"
56   ];
58   meta = with lib; {
59     description = "Safe, minimal import sorting for Python projects";
60     homepage = "https://github.com/facebook/usort";
61     changelog = "https://github.com/facebook/usort/blob/${version}/CHANGELOG.md";
62     license = licenses.mit;
63     maintainers = with maintainers; [ fab ];
64   };