nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 45 lines 954 B view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 flake8-import-order, 6 pyflakes, 7 tomli, 8 setuptools, 9 pytestCheckHook, 10 pythonAtLeast, 11}: 12 13buildPythonPackage rec { 14 pname = "zimports"; 15 version = "0.7.0"; 16 format = "setuptools"; 17 18 # upstream technically support 3.7 through 3.9, but 3.10 happens to work while 3.11 breaks with an import error 19 disabled = pythonAtLeast "3.11"; 20 21 src = fetchFromGitHub { 22 owner = "sqlalchemyorg"; 23 repo = "zimports"; 24 tag = "v${version}"; 25 hash = "sha256-5RSVRI1sgCXkkkMQo4azKj8AlShxDWEF6qQoU3VfoI8="; 26 }; 27 28 propagatedBuildInputs = [ 29 flake8-import-order 30 pyflakes 31 setuptools 32 tomli 33 ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 pythonImportsCheck = [ "zimports" ]; 38 39 meta = { 40 description = "Python import rewriter"; 41 homepage = "https://github.com/sqlalchemyorg/zimports"; 42 license = lib.licenses.mit; 43 maintainers = with lib.maintainers; [ timokau ]; 44 }; 45}