@@ -12,9 +12,9 @@
1212
1313# for tests
1414, pytestCheckHook
15−, yosys
1615, symbiyosys
1716, yices
17+, yosys
1818}:
1919
2020buildPythonPackage rec {
@@ -31,22 +31,35 @@ buildPythonPackage rec {
3131 sha256 = "0cjs9wgmxa76xqmjhsw4fsb2mhgvd85jgs2mrjxqp6fwp8rlgnl1";
3232 };
3333
34− nativeBuildInputs = [ setuptools-scm git ];
34+ SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}";
35+
36+ nativeBuildInputs = [
37+ git
38+ setuptools-scm
39+ ];
3540
3641 propagatedBuildInputs = [
37− setuptools
38− pyvcd
3942 jinja2
43+ pyvcd
44+ setuptools
4045 ] ++
4146 lib.optional (pythonOlder "3.9") importlib-resources ++
4247 lib.optional (pythonOlder "3.8") importlib-metadata;
4348
44− checkInputs = [ pytestCheckHook yosys symbiyosys yices ];
49+ checkInputs = [
50+ pytestCheckHook
51+ symbiyosys
52+ yices
53+ yosys
54+ ];
4555
46− preBuild = ''
47− export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
56+ postPatch = ''
57+ substituteInPlace setup.py \
58+ --replace "Jinja2~=2.11" "Jinja2>=2.11"
4859 '';
4960
61+ pythonImportsCheck = [ "nmigen" ];
62+
5063 meta = with lib; {
5164 description = "A refreshed Python toolbox for building complex digital hardware";
5265 homepage = "https://nmigen.info/nmigen";