2020-04-13 19:25:39 +00:00
|
|
|
{ lib
|
|
|
|
, isPy3k
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, flake8-import-order
|
|
|
|
, pyflakes
|
|
|
|
, mock
|
2020-06-21 19:06:39 +00:00
|
|
|
, setuptools
|
2020-04-13 19:25:39 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
2020-06-21 19:06:39 +00:00
|
|
|
setuptools
|
2020-04-13 19:25:39 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
];
|
|
|
|
|
2020-06-21 19:06:39 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
PYTHONPATH= $out/bin/zimports --help >/dev/null
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
2020-04-13 19:25:39 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python import rewriter";
|
|
|
|
homepage = "https://github.com/sqlalchemyorg/zimports";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ timokau ];
|
|
|
|
};
|
|
|
|
}
|