diff --git a/pkgs/development/python-modules/cocotb/default.nix b/pkgs/development/python-modules/cocotb/default.nix index 83ed76ac8669..688fc7c367bc 100644 --- a/pkgs/development/python-modules/cocotb/default.nix +++ b/pkgs/development/python-modules/cocotb/default.nix @@ -1,7 +1,7 @@ { lib , stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub , setuptools , setuptools-scm , cocotb-bus @@ -12,15 +12,14 @@ buildPythonPackage rec { pname = "cocotb"; - version = "1.6.2"; + version = "1.7.1"; - # - we need to use the tarball from PyPi - # or the full git checkout (with .git) - # - using fetchFromGitHub will cause a build failure, - # because it does not include required metadata - src = fetchPypi { - inherit pname version; - sha256 = "sha256-SY+1727DbWMg6CnmHw8k/VP0dwBRYszn+YyyvZXgvUs="; + # pypi source doesn't include tests + src = fetchFromGitHub { + owner = "cocotb"; + repo = "cocotb"; + rev = "v${version}"; + sha256 = "sha256-wACgT5r0YmSYvLhTsuFhTcJqeCtGGLifOmr7/Lz2Vug="; }; nativeBuildInputs = [ setuptools-scm ]; @@ -52,11 +51,13 @@ buildPythonPackage rec { ]; checkInputs = [ cocotb-bus pytestCheckHook swig verilog ]; - - checkPhase = '' + preCheck = '' export PATH=$out/bin:$PATH + mv cocotb cocotb.hidden ''; + pythonImportsCheck = [ "cocotb" ]; + meta = with lib; { description = "Coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python"; homepage = "https://github.com/cocotb/cocotb";