git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.cocotb: init at 1.2.0
commit6407a35d3702117641acd21ed6871b021c617411 authorMatt Huszagh <huszaghmatt@gmail.com> dateThu 17 Oct 2019, 07:24 (7 years ago) parent2c53f0f
2 files changed+45
pkgs/development/python-modules/cocotb/default.nix+43 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/cocotb/default.nixnew file+43
@@ -0,0 +1,43 @@
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+ done
28+ '';
29+
30+ checkInputs = [ swig verilog ];
31+
32+ checkPhase = ''
33+ export PATH=$out/bin:$PATH
34+ make test
35+ '';
36+
37+ meta = with stdenv.lib; {
38+ description = "Coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python";
39+ homepage = https://github.com/cocotb/cocotb;
40+ license = licenses.bsd3;
41+ maintainers = with maintainers; [ matthuszagh ];
42+ };
43+}
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 { };