git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #71288 from matthuszagh/cocotb

cocotb: init at 1.2.0

commit253de2cb223e0b2885a82eff861fe7f4590ddd28 authorMario Rodas <marsam@users.noreply.github.com> dateFri 25 Oct 2019, 08:59 (7 years ago) parentd6fc52b2924904
3 files changed+54
maintainers/maintainer-list.nix+6 pkgs/development/python-modules/cocotb/default.nix+46 pkgs/top-level/python-packages.nix+2
maintainers/maintainer-list.nix+6
@@ -4069,6 +4069,12 @@
40694069 githubId = 427866;
40704070 name = "Matthias Beyer";
40714071 };
4072+ matthuszagh = {
4073+ email = "huszaghmatt@gmail.com";
4074+ github = "matthuszagh";
4075+ githubId = 7377393;
4076+ name = "Matt Huszagh";
4077+ };
40724078 matti-kariluoma = {
40734079 email = "matti@kariluo.ma";
40744080 github = "matti-kariluoma";
pkgs/development/python-modules/cocotb/default.nixnew file+46
@@ -0,0 +1,46 @@
1+{ stdenv, buildPythonPackage, fetchFromGitHub, setuptools, swig, verilog }:
2+
3+buildPythonPackage rec {
4+ pname = "cocotb";
5+ version = "1.2.0";
6+
7+ src = fetchFromGitHub {
8+ owner = pname;
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "091q63jcm87xggqgqi44lw2vjxhl1v4yl0mv2c76hgavb29w4w5y";
12+ };
13+
14+ propagatedBuildInputs = [
15+ setuptools
16+ ];
17+
18+ postPatch = ''
19+ patchShebangs bin/*.py
20+
21+ # POSIX portability (TODO: upstream this)
22+ for f in \
23+ cocotb/share/makefiles/Makefile.* \
24+ cocotb/share/makefiles/simulators/Makefile.*
25+ do
26+ substituteInPlace $f --replace 'shell which' 'shell command -v'
27+ # replace hardcoded gcc. Remove once https://github.com/cocotb/cocotb/pull/1137 gets merged
28+ substituteInPlace $f --replace 'gcc' '$(CC)'
29+ substituteInPlace $f --replace 'g++' '$(CXX)'
30+ done
31+ '';
32+
33+ checkInputs = [ swig verilog ];
34+
35+ checkPhase = ''
36+ export PATH=$out/bin:$PATH
37+ make test
38+ '';
39+
40+ meta = with stdenv.lib; {
41+ description = "Coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python";
42+ homepage = https://github.com/cocotb/cocotb;
43+ license = licenses.bsd3;
44+ maintainers = with maintainers; [ matthuszagh ];
45+ };
46+}
pkgs/top-level/python-packages.nix+2
@@ -489,6 +489,8 @@ in {
489489
490490 cnvkit = callPackage ../development/python-modules/cnvkit { };
491491
492+ cocotb = callPackage ../development/python-modules/cocotb { };
493+
492494 connexion = callPackage ../development/python-modules/connexion { };
493495
494496 cozy = callPackage ../development/python-modules/cozy { };