17 buildPythonPackage rec {
20 format = "setuptools";
22 # pypi source doesn't include tests
23 src = fetchFromGitHub {
27 hash = "sha256-7KCo7g2I1rfm8QDHRm3ZKloHwjDIICnJCF8KhaFdvqY=";
30 nativeBuildInputs = [ setuptools-scm ];
32 buildInputs = [ setuptools ];
33 propagatedBuildInputs = [ find-libpython ];
36 patchShebangs bin/*.py
38 # POSIX portability (TODO: upstream this)
40 cocotb/share/makefiles/Makefile.* \
41 cocotb/share/makefiles/simulators/Makefile.*
43 substituteInPlace $f --replace 'shell which' 'shell command -v'
46 # remove circular dependency cocotb-bus from setup.py
47 substituteInPlace setup.py --replace "'cocotb-bus<1.0'" ""
51 # https://github.com/cocotb/cocotb/commit/425e1edb8e7133f4a891f2f87552aa2748cd8d2c#diff-4df986cbc2b1a3f22172caea94f959d8fcb4a128105979e6e99c68139469960cL33
53 "test_cocotb_parallel"
65 export PATH=$out/bin:$PATH
66 mv cocotb cocotb.hidden
69 pythonImportsCheck = [ "cocotb" ];
72 changelog = "https://github.com/cocotb/cocotb/releases/tag/v${version}";
73 description = "Coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python";
74 mainProgram = "cocotb-config";
75 homepage = "https://github.com/cocotb/cocotb";
76 license = lib.licenses.bsd3;
77 broken = stdenv.hostPlatform.isDarwin;
78 maintainers = with lib.maintainers; [