pythonPackages.cocotb: init at 1.2.0

wip/yesman
Matt Huszagh 5 years ago
parent 2c53f0f9f3
commit 6407a35d37
  1. 43
      pkgs/development/python-modules/cocotb/default.nix
  2. 2
      pkgs/top-level/python-packages.nix

@ -0,0 +1,43 @@
{ 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'
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 ];
};
}

@ -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 { };

Loading…
Cancel
Save