From 75e2fd312f557af2ee86538f9f79d815505a11dd Mon Sep 17 00:00:00 2001 From: soyouzpanda Date: Wed, 1 May 2024 18:04:38 +0200 Subject: [PATCH] python311Packages.milksnake: fix regex for python 3.11 https://github.com/getsentry/milksnake/blob/aad3845bba571dd42ea2e465aeda754ab8227550/milksnake/ffi.py#L8 does not work anymore in python 3.11 because global inline flags can now only used at the start of regex (https://docs.python.org/3/whatsnew/3.11.html#porting-to-python-3-11) --- pkgs/development/python-modules/milksnake/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/milksnake/default.nix b/pkgs/development/python-modules/milksnake/default.nix index 72115444ffa2c..567305b194e81 100644 --- a/pkgs/development/python-modules/milksnake/default.nix +++ b/pkgs/development/python-modules/milksnake/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, cffi }: +{ lib, buildPythonPackage, fetchPypi, fetchpatch, cffi }: buildPythonPackage rec { pname = "milksnake"; @@ -11,6 +11,14 @@ buildPythonPackage rec { sha256 = "120nprd8lqis7x7zy72536gk2j68f7gxm8gffmx8k4ygifvl7kfz"; }; + patches = [ + (fetchpatch { + name = "fix-regex-python-311.patch"; + url = "https://github.com/getsentry/milksnake/commit/421cc1ffab4d76d01366240c087ffb30d63b744c.diff"; + hash = "sha256-U/C4CCX8SEOzVXNpOf4hVy2V3Lh6fUrFkz5z+h191C8="; + }) + ]; + propagatedBuildInputs = [ cffi ];