diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/reorder-python-imports/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/reorder-python-imports/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/reorder-python-imports/default.nix b/nixpkgs/pkgs/development/python-modules/reorder-python-imports/default.nix new file mode 100644 index 000000000000..860188eba606 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/reorder-python-imports/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, aspy-refactor-imports +}: + +buildPythonPackage rec { + pname = "reorder-python-imports"; + version = "3.0.1"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "asottile"; + repo = "reorder_python_imports"; + rev = "v${version}"; + sha256 = "1bdKM1sUhpZHy03DdoTzpt1iGm1t1nWnuPyTgl3KhCY="; + }; + + propagatedBuildInputs = [ aspy-refactor-imports ]; + + pythonImportsCheck = [ + "reorder_python_imports" + ]; + + checkInputs = [ + pytestCheckHook + ]; + + # prints an explanation about PYTHONPATH first + # and therefore fails the assertion + disabledTests = [ + "test_success_messages_are_printed_on_stderr" + ]; + + meta = with lib; { + description = "Tool for automatically reordering python imports"; + homepage = "https://github.com/asottile/reorder_python_imports"; + license = licenses.mit; + maintainers = with maintainers; [ gador ]; + }; +} |