2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, coreutils
|
|
|
|
, jinja2
|
|
|
|
, pandas
|
2023-05-24 13:37:59 +00:00
|
|
|
, pyparsing
|
2022-09-09 14:08:57 +00:00
|
|
|
, pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonOlder
|
2022-09-09 14:08:57 +00:00
|
|
|
, which
|
|
|
|
, yosys
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "edalize";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.5.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "olofk";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-jsrJr/iuezh9/KL0PykWB1XKev4Wr5QeDh0ZWNMZSp8=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_edam.py \
|
|
|
|
--replace /usr/bin/touch ${coreutils}/bin/touch
|
|
|
|
patchShebangs tests/mock_commands/vsim
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
jinja2
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
reporting = [
|
|
|
|
pandas
|
|
|
|
pyparsing
|
|
|
|
];
|
|
|
|
};
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
which
|
|
|
|
yosys
|
2023-05-24 13:37:59 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"edalize"
|
|
|
|
];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
2023-02-02 18:25:31 +00:00
|
|
|
"tests/test_questa_formal.py"
|
|
|
|
"tests/test_slang.py"
|
2022-09-09 14:08:57 +00:00
|
|
|
"tests/test_apicula.py"
|
|
|
|
"tests/test_ascentlint.py"
|
|
|
|
"tests/test_diamond.py"
|
|
|
|
"tests/test_gatemate.py"
|
|
|
|
"tests/test_ghdl.py"
|
|
|
|
"tests/test_icarus.py"
|
|
|
|
"tests/test_icestorm.py"
|
|
|
|
"tests/test_ise.py"
|
|
|
|
"tests/test_mistral.py"
|
|
|
|
"tests/test_openlane.py"
|
|
|
|
"tests/test_oxide.py"
|
|
|
|
"tests/test_quartus.py"
|
|
|
|
"tests/test_radiant.py"
|
|
|
|
"tests/test_spyglass.py"
|
|
|
|
"tests/test_symbiyosys.py"
|
|
|
|
"tests/test_trellis.py"
|
|
|
|
"tests/test_vcs.py"
|
|
|
|
"tests/test_veribleformat.py"
|
|
|
|
"tests/test_veriblelint.py"
|
|
|
|
"tests/test_vivado.py"
|
|
|
|
"tests/test_xcelium.py"
|
|
|
|
"tests/test_xsim.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Abstraction library for interfacing EDA tools";
|
|
|
|
homepage = "https://github.com/olofk/edalize";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/olofk/edalize/releases/tag/v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = licenses.bsd2;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ astro ];
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|