2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, isPy3k
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, flake8-import-order
|
|
|
|
, pyflakes
|
|
|
|
, mock
|
2020-06-15 15:56:04 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "zimports";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sqlalchemyorg";
|
|
|
|
repo = "zimports";
|
2022-02-10 20:34:41 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "11mg7j7xiypv9hki4qbnp9jsgwgfdrgdzfqyrzk5x0s4hycgi4q0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyflakes
|
|
|
|
flake8-import-order
|
2020-06-15 15:56:04 +00:00
|
|
|
setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
];
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
PYTHONPATH= $out/bin/zimports --help >/dev/null
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python import rewriter";
|
|
|
|
homepage = "https://github.com/sqlalchemyorg/zimports";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ timokau ];
|
|
|
|
};
|
|
|
|
}
|