diff --git a/pkgs/development/python-modules/zipp/1.nix b/pkgs/development/python-modules/zipp/1.nix new file mode 100644 index 00000000000..d7447a26159 --- /dev/null +++ b/pkgs/development/python-modules/zipp/1.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools_scm +, pytest +, pytest-flake8 +, more-itertools +, toml +}: + +buildPythonPackage rec { + pname = "zipp"; + version = "1.0.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0v3qayhqv7vyzydpydwcp51bqciw8p2ajddw68x5k8zppc0vx3yk"; + }; + + nativeBuildInputs = [ setuptools_scm ]; + + propagatedBuildInputs = [ more-itertools ]; + + checkInputs = [ pytest pytest-flake8 ]; + + checkPhase = '' + pytest + ''; + + # Prevent infinite recursion with pytest + doCheck = false; + + meta = with lib; { + description = "Pathlib-compatible object wrapper for zip files"; + homepage = "https://github.com/jaraco/zipp"; + license = licenses.mit; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0aa27ff933e..f16c0110a63 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6493,7 +6493,10 @@ in { zha-quirks = callPackage ../development/python-modules/zha-quirks { }; - zipp = callPackage ../development/python-modules/zipp { }; + zipp = if pythonOlder "3.6" then + callPackage ../development/python-modules/zipp/1.nix { } + else + callPackage ../development/python-modules/zipp { }; zope_broken = callPackage ../development/python-modules/zope_broken { };