From 19da87792f417276c7d289200708b4af6fd2c6d6 Mon Sep 17 00:00:00 2001 From: magicquark <198001825+magicquark@users.noreply.github.com> Date: Tue, 16 Sep 2025 03:09:19 +0100 Subject: [PATCH] python3Packages.thriftpy2: apply upstream patch to remove toml dep - PR https://github.com/NixOS/nixpkgs/pull/431074 updated this package from 0.5.2 -> 0.5.3. - Between 0.5.2 and 0.5.3 a dependency for `toml` was added (see https://github.com/Thriftpy/thriftpy2/commit/8e226b12750829ee48abc1f883ea0fcf0b13f717). - The derivation does not include `toml`, so the build failed. - However, upstream have since removed `toml` in https://github.com/Thriftpy/thriftpy2/commit/0127d259eb4b96acb060cd158ca709f0597b148c. - A new upstream version has not been made yet, so apply the patch directly to fix the build. When upstream bumps, the patch can be removed. --- pkgs/development/python-modules/thriftpy2/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/thriftpy2/default.nix b/pkgs/development/python-modules/thriftpy2/default.nix index 03ac0195c2d3..d3ebd886d6bf 100644 --- a/pkgs/development/python-modules/thriftpy2/default.nix +++ b/pkgs/development/python-modules/thriftpy2/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, cython, fetchFromGitHub, + fetchpatch, ply, pythonOlder, six, @@ -24,6 +25,12 @@ buildPythonPackage rec { hash = "sha256-idUKqpyRj8lq9Aq6vEEeYEawzRPOdNsySnkgfhwPtMc="; }; + patches = [ + (fetchpatch { + url = "https://github.com/Thriftpy/thriftpy2/commit/0127d259eb4b96acb060cd158ca709f0597b148c.patch"; + sha256 = "sha256-UBcbd8NTkPyko1s9jTjKlQ7HprwtyOZS0m66u1CPH3A="; + }) + ]; build-system = [ setuptools ]; nativeBuildInputs = [ cython ];