diff --git a/pkgs/by-name/po/poetry/package.nix b/pkgs/by-name/po/poetry/package.nix index b96a4cce5b14..e5ce69dbc168 100644 --- a/pkgs/by-name/po/poetry/package.nix +++ b/pkgs/by-name/po/poetry/package.nix @@ -11,6 +11,18 @@ let { poetry = self.callPackage ./unwrapped.nix { }; + # Poetry 2.1.4 officially requires virtualenv >=20.26.6, <20.33.0 + # otherwise will be incompatible with python312 + # see: https://github.com/python-poetry/poetry/issues/10490 + virtualenv = super.virtualenv.overridePythonAttrs (old: rec { + version = "20.30.0"; + src = fetchPypi { + inherit (old) pname; + inherit version; + hash = "sha256-gAhjFivKpUUKbk1yEElzDn8trgdyDgkCsOQEC9b5rag="; + }; + }); + # The versions of Poetry and poetry-core need to match exactly, # and poetry-core in nixpkgs requires a staging cycle to be updated, # so apply an override here. diff --git a/pkgs/by-name/po/poetry/unwrapped.nix b/pkgs/by-name/po/poetry/unwrapped.nix index f9ef63ee0313..9a1486765cce 100644 --- a/pkgs/by-name/po/poetry/unwrapped.nix +++ b/pkgs/by-name/po/poetry/unwrapped.nix @@ -60,7 +60,6 @@ buildPythonPackage rec { pythonRelaxDeps = [ "dulwich" "keyring" - "virtualenv" ]; dependencies = [