diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/package-management/poetry')
-rw-r--r-- | nixpkgs/pkgs/tools/package-management/poetry/default.nix | 11 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix | 13 |
2 files changed, 16 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/tools/package-management/poetry/default.nix b/nixpkgs/pkgs/tools/package-management/poetry/default.nix index 6de9219529bd..75cede5df7d3 100644 --- a/nixpkgs/pkgs/tools/package-management/poetry/default.nix +++ b/nixpkgs/pkgs/tools/package-management/poetry/default.nix @@ -1,8 +1,8 @@ -{ python3, fetchFromGitHub }: +{ lib, python3, fetchFromGitHub }: let - python = python3.override { - packageOverrides = self: super: rec { + newPackageOverrides = + self: super: { poetry = self.callPackage ./unwrapped.nix { }; # The versions of Poetry and poetry-core need to match exactly, @@ -21,7 +21,10 @@ let }; }); } // (plugins self); - }; + python = python3.override (old: { + packageOverrides = lib.composeManyExtensions + ((if old ? packageOverrides then [ old.packageOverrides ] else [ ]) ++ [ newPackageOverrides ]); + }); plugins = ps: with ps; { poetry-audit-plugin = callPackage ./plugins/poetry-audit-plugin.nix { }; diff --git a/nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix b/nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix index 33fcb8e6f46d..f13a7715464b 100644 --- a/nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix +++ b/nixpkgs/pkgs/tools/package-management/poetry/unwrapped.nix @@ -10,8 +10,8 @@ , cleo , crashtest , dulwich +, fastjsonschema , installer -, jsonschema , keyring , packaging , pexpect @@ -37,6 +37,7 @@ , pytest-mock , pytest-xdist , pythonAtLeast +, darwin }: buildPythonPackage rec { @@ -59,8 +60,10 @@ buildPythonPackage rec { ]; pythonRelaxDeps = [ - # only pinned to avoid dependency on Rust - "jsonschema" + # platformdirs 4.x is backwards compatible; https://github.com/python-poetry/poetry/commit/eb80d10846f7336b0b2a66ce2964e72dffee9a1c + "platformdirs" + # xattr 1.0 is backwards compatible modulo dropping Python 2 support: https://github.com/xattr/xattr/compare/v0.10.0...v1.0.0 + "xattr" ]; propagatedBuildInputs = [ @@ -69,8 +72,8 @@ buildPythonPackage rec { cleo crashtest dulwich + fastjsonschema installer - jsonschema keyring packaging pexpect @@ -108,6 +111,8 @@ buildPythonPackage rec { httpretty pytest-mock pytest-xdist + ] ++ lib.optionals stdenv.isDarwin [ + darwin.ps ]; preCheck = ('' |