Merge pull request #71288 from matthuszagh/cocotb

cocotb: init at 1.2.0
This commit is contained in:
Mario Rodas 2019-10-25 08:59:20 -05:00 committed by GitHub
commit 253de2cb22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 0 deletions

View file

@ -4069,6 +4069,12 @@
githubId = 427866;
name = "Matthias Beyer";
};
matthuszagh = {
email = "huszaghmatt@gmail.com";
github = "matthuszagh";
githubId = 7377393;
name = "Matt Huszagh";
};
matti-kariluoma = {
email = "matti@kariluo.ma";
github = "matti-kariluoma";

View file

@ -0,0 +1,46 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, setuptools, swig, verilog }:
buildPythonPackage rec {
pname = "cocotb";
version = "1.2.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "091q63jcm87xggqgqi44lw2vjxhl1v4yl0mv2c76hgavb29w4w5y";
};
propagatedBuildInputs = [
setuptools
];
postPatch = ''
patchShebangs bin/*.py
# POSIX portability (TODO: upstream this)
for f in \
cocotb/share/makefiles/Makefile.* \
cocotb/share/makefiles/simulators/Makefile.*
do
substituteInPlace $f --replace 'shell which' 'shell command -v'
# replace hardcoded gcc. Remove once https://github.com/cocotb/cocotb/pull/1137 gets merged
substituteInPlace $f --replace 'gcc' '$(CC)'
substituteInPlace $f --replace 'g++' '$(CXX)'
done
'';
checkInputs = [ swig verilog ];
checkPhase = ''
export PATH=$out/bin:$PATH
make test
'';
meta = with stdenv.lib; {
description = "Coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python";
homepage = https://github.com/cocotb/cocotb;
license = licenses.bsd3;
maintainers = with maintainers; [ matthuszagh ];
};
}

View file

@ -489,6 +489,8 @@ in {
cnvkit = callPackage ../development/python-modules/cnvkit { };
cocotb = callPackage ../development/python-modules/cocotb { };
connexion = callPackage ../development/python-modules/connexion { };
cozy = callPackage ../development/python-modules/cozy { };