From 1b5d3d01f06ec043ec99553b1e9828dfbbdbab10 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Tue, 31 Mar 2026 12:30:58 -0700 Subject: [PATCH] python3Packages.scalene: 2.1.4 -> 2.2.1 --- .../python-modules/scalene/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scalene/default.nix b/pkgs/development/python-modules/scalene/default.nix index 17f46719c69e..c1d583cd9bba 100644 --- a/pkgs/development/python-modules/scalene/default.nix +++ b/pkgs/development/python-modules/scalene/default.nix @@ -12,6 +12,7 @@ psutil, pydantic, pytestCheckHook, + python, pyyaml, rich, setuptools-scm, @@ -34,18 +35,20 @@ let tag = "v4.0.0"; hash = "sha256-tgLJNJw/dJGQMwCmfkWNBvHB76xZVyyfVVplq7aSJnI="; }; + + pythonPath = lib.getExe python; in buildPythonPackage (finalAttrs: { pname = "scalene"; - version = "2.1.4"; + version = "2.2.1"; pyproject = true; src = fetchFromGitHub { owner = "plasma-umass"; repo = "scalene"; tag = "v${finalAttrs.version}"; - hash = "sha256-ISXD7QegTL0OvAGS7KYZAk9MAKTr0hMFe/9ws02Ykgk="; + hash = "sha256-a8laU7w6DLNIxmfhis/PvYd0iQMSqiQ2j6WURbsWPxk="; }; patches = [ @@ -62,6 +65,15 @@ buildPythonPackage (finalAttrs: { sed -i 's/^#define vsnprintf vsnprintf_/\/\/&/' vendor/printf/printf.h ''; + postPatch = '' + # Fix hash mismatch + rm vendor/printf/printf.c + + # Set correct sys.executable + substituteInPlace tests/test_{multiprocessing_pool_spawn,on_off_windows}.py \ + --replace-fail "sys.executable" "\"${pythonPath}\"" + ''; + build-system = [ cython setuptools