nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, aspy-refactor-imports
7}:
8
9buildPythonPackage rec {
10 pname = "reorder-python-imports";
11 version = "3.1.0";
12 disabled = pythonOlder "3.7";
13
14 src = fetchFromGitHub {
15 owner = "asottile";
16 repo = "reorder_python_imports";
17 rev = "v${version}";
18 hash = "sha256-Ge+VQjK24TqWLMQS19DBX+FFHF3irogK21orlENJx50=";
19 };
20
21 propagatedBuildInputs = [ aspy-refactor-imports ];
22
23 pythonImportsCheck = [
24 "reorder_python_imports"
25 ];
26
27 checkInputs = [
28 pytestCheckHook
29 ];
30
31 # prints an explanation about PYTHONPATH first
32 # and therefore fails the assertion
33 disabledTests = [
34 "test_success_messages_are_printed_on_stderr"
35 ];
36
37 meta = with lib; {
38 description = "Tool for automatically reordering python imports";
39 homepage = "https://github.com/asottile/reorder_python_imports";
40 license = licenses.mit;
41 maintainers = with maintainers; [ gador ];
42 };
43}