From 3b49d9b094f2647f5afd72281a624fac170fe437 Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 13 Nov 2024 23:05:50 -0500 Subject: [PATCH] python312Packages.borb: fix build failure on darwin --- pkgs/development/python-modules/borb/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/borb/default.nix b/pkgs/development/python-modules/borb/default.nix index 589eedcab9bf..3246a11213b4 100644 --- a/pkgs/development/python-modules/borb/default.nix +++ b/pkgs/development/python-modules/borb/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, cryptography, fetchFromGitHub, @@ -30,6 +31,14 @@ buildPythonPackage rec { hash = "sha256-eVxpcYL3ZgwidkSt6tUav3Bkne4lo1QCshdUFqkA0wI="; }; + # ModuleNotFoundError: No module named '_decimal' + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' + grep -Rl 'from _decimal' tests/ | while read -r test_file; do + substituteInPlace "$test_file" \ + --replace-fail 'from _decimal' 'from decimal' + done + ''; + build-system = [ setuptools ]; dependencies = [