Merge pull request #263139 from K900/poetry-fixes

poetry: remove unnecessary overrides, backport upstream patch for build 1.0 compatibility
This commit is contained in:
Martin Weinelt 2023-10-24 15:26:27 +02:00 committed by GitHub
commit 18f30ffe35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 20 deletions

View File

@ -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);
};

View File

@ -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