Merge pull request #129405 from fabaff/fix-migen

python3Packages.nmigen: fix build
This commit is contained in:
Fabian Affolter 2021-07-06 11:00:27 +02:00 committed by GitHub
commit b04ea508dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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