about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cocotb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/cocotb/default.nix')
-rw-r--r--pkgs/development/python-modules/cocotb/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/cocotb/default.nix b/pkgs/development/python-modules/cocotb/default.nix
index d24d3bc798227..83ed76ac86691 100644
--- a/pkgs/development/python-modules/cocotb/default.nix
+++ b/pkgs/development/python-modules/cocotb/default.nix
@@ -40,8 +40,17 @@ buildPythonPackage rec {
 
     # remove circular dependency cocotb-bus from setup.py
     substituteInPlace setup.py --replace "'cocotb-bus<1.0'" ""
+  '' + lib.optionalString stdenv.isDarwin ''
+    # disable lto on darwin
+    # https://github.com/NixOS/nixpkgs/issues/19098
+    substituteInPlace cocotb_build_libs.py --replace "-flto" ""
   '';
 
+  patches = [
+    # Fix "can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file" error
+    ./0001-Patch-LDCXXSHARED-for-macOS-along-with-LDSHARED.patch
+  ];
+
   checkInputs = [ cocotb-bus pytestCheckHook swig verilog ];
 
   checkPhase = ''
@@ -53,6 +62,5 @@ buildPythonPackage rec {
     homepage = "https://github.com/cocotb/cocotb";
     license = licenses.bsd3;
     maintainers = with maintainers; [ matthuszagh ];
-    broken = stdenv.isDarwin;
   };
 }