diff --git a/pkgs/tools/package-management/poetry/default.nix b/pkgs/tools/package-management/poetry/default.nix index 7af4fb550b87..40d6f2c8647e 100644 --- a/pkgs/tools/package-management/poetry/default.nix +++ b/pkgs/tools/package-management/poetry/default.nix @@ -41,18 +41,19 @@ let hash = "sha256-GpZ0vMByHTu5kl7KrrFFK2aZMmkNO7xOEc8NI2H9k34="; }; }); - }; + } // (plugins self); }; - plugins = with python.pkgs; { + plugins = ps: with ps; { poetry-audit-plugin = callPackage ./plugins/poetry-audit-plugin.nix { }; + poetry-plugin-export = callPackage ./plugins/poetry-plugin-export.nix { }; poetry-plugin-up = callPackage ./plugins/poetry-plugin-up.nix { }; }; # selector is a function mapping pythonPackages to a list of plugins # e.g. poetry.withPlugins (ps: with ps; [ poetry-plugin-up ]) withPlugins = selector: let - selected = selector plugins; + selected = selector (plugins python.pkgs); in python.pkgs.toPythonApplication (python.pkgs.poetry.overridePythonAttrs (old: { propagatedBuildInputs = old.propagatedBuildInputs ++ selected; @@ -65,8 +66,9 @@ let rm $out/nix-support/propagated-build-inputs ''; - passthru = rec { - inherit plugins withPlugins python; + passthru = { + plugins = plugins python.pkgs; + inherit withPlugins python; }; })); in withPlugins (ps: [ ]) diff --git a/pkgs/development/python-modules/poetry-plugin-export/default.nix b/pkgs/tools/package-management/poetry/plugins/poetry-plugin-export.nix similarity index 100% rename from pkgs/development/python-modules/poetry-plugin-export/default.nix rename to pkgs/tools/package-management/poetry/plugins/poetry-plugin-export.nix diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 108029471b6c..7ea8e419350d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8103,8 +8103,6 @@ self: super: with self; { poetry-dynamic-versioning = callPackage ../development/python-modules/poetry-dynamic-versioning { }; - poetry-plugin-export = callPackage ../development/python-modules/poetry-plugin-export { }; - poetry-semver = callPackage ../development/python-modules/poetry-semver { }; poezio = callPackage ../applications/networking/instant-messengers/poezio { };