diff --git a/pkgs/tools/package-management/poetry/default.nix b/pkgs/tools/package-management/poetry/default.nix index 4d4a98491cb9..35ca917056cd 100644 --- a/pkgs/tools/package-management/poetry/default.nix +++ b/pkgs/tools/package-management/poetry/default.nix @@ -1,28 +1,9 @@ -{ lib -, python3 -, fetchFromGitHub -, fetchPypi -}: +{ python3 }: let python = python3.override { packageOverrides = self: super: { poetry = self.callPackage ./unwrapped.nix { }; - - # version overrides required by poetry and its plugins - deepdiff = super.deepdiff.overridePythonAttrs (old: rec { - doCheck = false; - }); - poetry-core = super.poetry-core.overridePythonAttrs (old: rec { - version = "1.7.0"; - src = fetchFromGitHub { - owner = "python-poetry"; - repo = "poetry-core"; - rev = version; - hash = "sha256-OfY2zc+5CgOrgbiPVnvMdT4h1S7Aek8S7iThl6azmsk="; - }; - patches = [ ]; - }); } // (plugins self); }; diff --git a/pkgs/tools/package-management/poetry/unwrapped.nix b/pkgs/tools/package-management/poetry/unwrapped.nix index dd1305501916..751db3ceec99 100644 --- a/pkgs/tools/package-management/poetry/unwrapped.nix +++ b/pkgs/tools/package-management/poetry/unwrapped.nix @@ -3,6 +3,7 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub +, fetchpatch , installShellFiles , pythonRelaxDepsHook , build @@ -53,6 +54,15 @@ buildPythonPackage rec { hash = "sha256-/OvYT4Vix1t5Yx/Tx0z3E9L9qJ4OdI4maQqUVl8H524="; }; + patches = [ + # Backport patch to fix pypa/build 1.0 incompatibility + # FIXME: remove in next release + (fetchpatch { + url = "https://github.com/python-poetry/poetry/commit/a16863d1a448ff91a7cc4e48042d3a8669b78b34.patch"; + hash = "sha256-dWa5W1jFS7h5cTgoFy89o1Rbtmyddvme4sus+lld058="; + }) + ]; + nativeBuildInputs = [ installShellFiles pythonRelaxDepsHook