2019-08-30 22:44:30 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
2019-09-27 16:07:14 +02:00
|
|
|
, setuptools
|
|
|
|
, setuptools_scm
|
2019-08-30 22:44:30 +02:00
|
|
|
, pyvcd
|
|
|
|
, jinja2
|
|
|
|
|
2019-10-13 18:29:13 +02:00
|
|
|
# for tests
|
2019-08-30 22:44:30 +02:00
|
|
|
, yosys
|
|
|
|
, symbiyosys
|
|
|
|
, yices
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nmigen";
|
2020-02-08 18:48:27 +01:00
|
|
|
version = "unstable-2019-02-08";
|
2019-09-27 16:07:14 +02:00
|
|
|
# python setup.py --version
|
2020-02-08 18:48:27 +01:00
|
|
|
realVersion = "0.2.dev49+g${lib.substring 0 7 src.rev}";
|
2019-08-30 22:44:30 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-02-08 18:48:27 +01:00
|
|
|
owner = "nmigen";
|
2019-08-30 22:44:30 +02:00
|
|
|
repo = "nmigen";
|
2020-02-08 18:48:27 +01:00
|
|
|
rev = "66f4510c4465be5d0763d7835770553434e4ee91";
|
|
|
|
sha256 = "19y39c4ywckm4yzrpjzcdl9pqy9d1sf1zsb4zpzajpmnfqccc3b0";
|
2019-08-30 22:44:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2019-09-27 16:07:14 +02:00
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
|
|
|
|
2020-02-08 18:48:27 +01:00
|
|
|
propagatedBuildInputs = [ setuptools pyvcd jinja2 ];
|
2019-08-30 22:44:30 +02:00
|
|
|
|
2019-10-13 18:29:13 +02:00
|
|
|
checkInputs = [ yosys symbiyosys yices ];
|
2019-08-30 22:44:30 +02:00
|
|
|
|
2019-09-27 16:07:14 +02:00
|
|
|
preBuild = ''
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
|
|
|
|
'';
|
|
|
|
|
2019-08-30 22:44:30 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A refreshed Python toolbox for building complex digital hardware";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/nmigen/nmigen";
|
2020-02-08 18:48:27 +01:00
|
|
|
license = licenses.bsd2;
|
2019-08-30 22:44:30 +02:00
|
|
|
maintainers = with maintainers; [ emily ];
|
|
|
|
};
|
|
|
|
}
|