python3Packages.cocotb: 1.5.1 -> 1.5.2
this switches from GitHub to PyPi, because the build requires a proper release tarball also PyPi release does contain tests, so we don't strictly require GitHub checkout
This commit is contained in:
parent
ff555e8f88
commit
0f2201119b
|
@ -1,19 +1,31 @@
|
||||||
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, setuptools, swig, verilog }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, setuptools
|
||||||
|
, setuptools-scm
|
||||||
|
, cocotb-bus
|
||||||
|
, pytest
|
||||||
|
, swig
|
||||||
|
, verilog
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "cocotb";
|
pname = "cocotb";
|
||||||
version = "1.5.1";
|
version = "1.5.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
# - we need to use the tarball from PyPi
|
||||||
owner = pname;
|
# or the full git checkout (with .git)
|
||||||
repo = pname;
|
# - using fetchFromGitHub will cause a build failure,
|
||||||
rev = "v${version}";
|
# because it does not include required metadata
|
||||||
sha256 = "02bw2i03vd4rcvdk10qdjl2lbvvy81cn9qpr8vzq8cm9h45689mv";
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "9f4f3e6eb9caeb479e98d604770645b57469cd25b39e28df1916ffcd593efbe6";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
nativeBuildInputs = [ setuptools-scm ];
|
||||||
setuptools
|
|
||||||
];
|
buildInputs = [ setuptools ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs bin/*.py
|
patchShebangs bin/*.py
|
||||||
|
@ -25,16 +37,14 @@ buildPythonPackage rec {
|
||||||
do
|
do
|
||||||
substituteInPlace $f --replace 'shell which' 'shell command -v'
|
substituteInPlace $f --replace 'shell which' 'shell command -v'
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# remove circular dependency cocotb-bus from setup.py
|
||||||
|
substituteInPlace setup.py --replace "'cocotb-bus<1.0'" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkInputs = [ swig verilog ];
|
checkInputs = [ cocotb-bus pytest swig verilog ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
# test expected failures actually pass because of a fix in our icarus version
|
|
||||||
# https://github.com/cocotb/cocotb/issues/1952
|
|
||||||
substituteInPlace tests/test_cases/test_discovery/test_discovery.py \
|
|
||||||
--replace 'def access_single_bit' $'def foo(x): pass\ndef foo'
|
|
||||||
|
|
||||||
export PATH=$out/bin:$PATH
|
export PATH=$out/bin:$PATH
|
||||||
make test
|
make test
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue