1{ lib 2, isPy3k 3, fetchFromGitHub 4, buildPythonPackage 5, flake8-import-order 6, pyflakes 7, mock 8, setuptools 9}: 10 11buildPythonPackage rec { 12 pname = "zimports"; 13 version = "0.2.0"; 14 15 src = fetchFromGitHub { 16 owner = "sqlalchemyorg"; 17 repo = "zimports"; 18 rev = version; 19 sha256 = "0a5axflkk0wv0rdnrh8l2rgj8gh2pfkg5lrvr8x4yxxiifawrafc"; 20 }; 21 22 disabled = !isPy3k; 23 24 propagatedBuildInputs = [ 25 pyflakes 26 flake8-import-order 27 setuptools 28 ]; 29 30 checkInputs = [ 31 mock 32 ]; 33 34 checkPhase = '' 35 runHook preInstallCheck 36 PYTHONPATH= $out/bin/zimports --help >/dev/null 37 runHook postInstallCheck 38 ''; 39 40 meta = with lib; { 41 description = "Python import rewriter"; 42 homepage = "https://github.com/sqlalchemyorg/zimports"; 43 license = licenses.mit; 44 maintainers = with maintainers; [ timokau ]; 45 }; 46}