python3Packages.nmigen: fix build

This commit is contained in:
Fabian Affolter 2021-07-06 09:07:23 +02:00
parent b118976151
commit e1fb67832b

View File

@ -12,9 +12,9 @@
# for tests
, pytestCheckHook
, yosys
, symbiyosys
, yices
, yosys
}:
buildPythonPackage rec {
@ -31,22 +31,35 @@ buildPythonPackage rec {
sha256 = "0cjs9wgmxa76xqmjhsw4fsb2mhgvd85jgs2mrjxqp6fwp8rlgnl1";
};
nativeBuildInputs = [ setuptools-scm git ];
SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}";
nativeBuildInputs = [
git
setuptools-scm
];
propagatedBuildInputs = [
setuptools
pyvcd
jinja2
pyvcd
setuptools
] ++
lib.optional (pythonOlder "3.9") importlib-resources ++
lib.optional (pythonOlder "3.8") importlib-metadata;
checkInputs = [ pytestCheckHook yosys symbiyosys yices ];
checkInputs = [
pytestCheckHook
symbiyosys
yices
yosys
];
preBuild = ''
export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
postPatch = ''
substituteInPlace setup.py \
--replace "Jinja2~=2.11" "Jinja2>=2.11"
'';
pythonImportsCheck = [ "nmigen" ];
meta = with lib; {
description = "A refreshed Python toolbox for building complex digital hardware";
homepage = "https://nmigen.info/nmigen";