Unverified Commit 18f30ffe authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #263139 from K900/poetry-fixes

poetry: remove unnecessary overrides, backport upstream patch for build 1.0 compatibility
parents 0a1eec77 ed11e1b4
Loading
Loading
Loading
Loading
+1 −20
Original line number Diff line number Diff line
{ 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);
  };

+10 −0
Original line number Diff line number Diff line
@@ -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