From a6d212c099b2667044ecea1e99eb00ede49b0544 Mon Sep 17 00:00:00 2001 From: Evils Date: Sat, 16 Mar 2024 03:34:44 +0100 Subject: [PATCH] python312Packages.diffimg: fix test python 3.12 seems to yield a very slightly different result change is the least significant digit of a ratio, seems safe and upgrade to --replace-warn while i'm here --- pkgs/development/python-modules/diffimg/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/diffimg/default.nix b/pkgs/development/python-modules/diffimg/default.nix index e5afcdf8cdf1..c1769d118f90 100644 --- a/pkgs/development/python-modules/diffimg/default.nix +++ b/pkgs/development/python-modules/diffimg/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , pillow , unittestCheckHook +, pythonAtLeast }: buildPythonPackage rec { @@ -21,7 +22,10 @@ buildPythonPackage rec { # fix offered to upstream https://github.com/nicolashahn/diffimg/pull/6 postPatch = '' substituteInPlace diffimg/test.py \ - --replace "from diff import diff" "from diffimg.diff import diff" + --replace-warn "from diff import diff" "from diffimg.diff import diff" + '' + lib.optionalString (pythonAtLeast "3.12") '' + substituteInPlace diffimg/test.py \ + --replace-warn "3503192421617232" "3503192421617233" ''; propagatedBuildInputs = [