diff --git a/pkgs/development/python-modules/scikit-build-core/default.nix b/pkgs/development/python-modules/scikit-build-core/default.nix index a436bb78aa32..5e2e86cca1d8 100644 --- a/pkgs/development/python-modules/scikit-build-core/default.nix +++ b/pkgs/development/python-modules/scikit-build-core/default.nix @@ -1,7 +1,9 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, + fetchpatch, # build-system hatch-vcs, @@ -37,7 +39,15 @@ buildPythonPackage rec { hash = "sha256-zBTDacTkeclz+/X0SUl1xkxLz4zsfeLOD4Ew0V1Y1iU="; }; - postPatch = ""; + # TODO: Rebuild avoidance; clean up on `staging`. + ${if stdenv.hostPlatform.isDarwin then "patches" else null} = [ + # Backport an upstream commit to fix the tests on Darwin. + (fetchpatch { + url = "https://github.com/scikit-build/scikit-build-core/commit/c30f52a3b2bd01dc05f23d3b89332c213006afe0.patch"; + excludes = [ ".github/workflows/ci.yml" ]; + hash = "sha256-5E9QfF5UcSNY1wzHzieEEHEPYzPjUTb66CKCodYb9vo="; + }) + ]; build-system = [ hatch-vcs