anchor.diff:      # test expected failures actually pass because of a fix in our icarus version
       # https://github.com/cocotb/cocotb/issues/1952
       substituteInPlace tests/test_cases/test_discovery/test_discovery.py \
  -      --replace 'def access_single_bit' $'def foo(x): pass\ndef foo' \
  -      --replace 'def access_single_bit_assignment' $'def foo(x): pass\ndef foo'
  +      --replace 'def access_single_bit' $'def foo(x): pass\ndef foo'
   
       export PATH=$out/bin:$PATH
       make test
  
positive.code:     do
        substituteInPlace $f --replace 'shell which' 'shell command -v'
      done
  
      # This can perhaps be removed in the next update after 1.3.2?
      substituteInPlace cocotb/share/makefiles/Makefile.inc --replace "-Werror" ""
    '';
  
    checkInputs = [ swig verilog ];
  
negative.code: { lib, stdenv, buildPythonPackage, fetchFromGitHub, setuptools, swig, verilog }:
  
  buildPythonPackage rec {
    pname = "cocotb";
  