Unverified Commit 30e9f55f authored by Artturin's avatar Artturin Committed by GitHub
Browse files

python312Packages.borb: fix build failure on darwin (#355819)

parents 70e10971 3b49d9b0
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
{
  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 = [