diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/zimports/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/zimports/default.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/zimports/default.nix b/nixpkgs/pkgs/development/python-modules/zimports/default.nix new file mode 100644 index 000000000000..338dd93150b3 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/zimports/default.nix @@ -0,0 +1,46 @@ +{ lib +, isPy3k +, fetchFromGitHub +, buildPythonPackage +, flake8-import-order +, pyflakes +, mock +, setuptools +}: + +buildPythonPackage rec { + pname = "zimports"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "sqlalchemyorg"; + repo = "zimports"; + rev = version; + sha256 = "0a5axflkk0wv0rdnrh8l2rgj8gh2pfkg5lrvr8x4yxxiifawrafc"; + }; + + disabled = !isPy3k; + + propagatedBuildInputs = [ + pyflakes + flake8-import-order + setuptools + ]; + + checkInputs = [ + mock + ]; + + checkPhase = '' + runHook preInstallCheck + PYTHONPATH= $out/bin/zimports --help >/dev/null + runHook postInstallCheck + ''; + + meta = with lib; { + description = "Python import rewriter"; + homepage = "https://github.com/sqlalchemyorg/zimports"; + license = licenses.mit; + maintainers = with maintainers; [ timokau ]; + }; +} |