1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, coreutils
5, jinja2
6, pandas
7, pyparsing
8, pytestCheckHook
9, pythonOlder
10, which
11, yosys
12}:
13
14buildPythonPackage rec {
15 pname = "edalize";
16 version = "0.5.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "olofk";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 hash = "sha256-jsrJr/iuezh9/KL0PykWB1XKev4Wr5QeDh0ZWNMZSp8=";
26 };
27
28 postPatch = ''
29 substituteInPlace tests/test_edam.py \
30 --replace /usr/bin/touch ${coreutils}/bin/touch
31 patchShebangs tests/mock_commands/vsim
32 '';
33
34 propagatedBuildInputs = [
35 jinja2
36 ];
37
38 passthru.optional-dependencies = {
39 reporting = [
40 pandas
41 pyparsing
42 ];
43 };
44
45 nativeCheckInputs = [
46 pytestCheckHook
47 which
48 yosys
49 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
50
51 pythonImportsCheck = [
52 "edalize"
53 ];
54
55 disabledTestPaths = [
56 "tests/test_questa_formal.py"
57 "tests/test_slang.py"
58 "tests/test_apicula.py"
59 "tests/test_ascentlint.py"
60 "tests/test_diamond.py"
61 "tests/test_gatemate.py"
62 "tests/test_ghdl.py"
63 "tests/test_icarus.py"
64 "tests/test_icestorm.py"
65 "tests/test_ise.py"
66 "tests/test_mistral.py"
67 "tests/test_openlane.py"
68 "tests/test_oxide.py"
69 "tests/test_quartus.py"
70 "tests/test_radiant.py"
71 "tests/test_spyglass.py"
72 "tests/test_symbiyosys.py"
73 "tests/test_trellis.py"
74 "tests/test_vcs.py"
75 "tests/test_veribleformat.py"
76 "tests/test_veriblelint.py"
77 "tests/test_vivado.py"
78 "tests/test_xcelium.py"
79 "tests/test_xsim.py"
80 ];
81
82 meta = with lib; {
83 description = "Abstraction library for interfacing EDA tools";
84 homepage = "https://github.com/olofk/edalize";
85 changelog = "https://github.com/olofk/edalize/releases/tag/v${version}";
86 license = licenses.bsd2;
87 maintainers = with maintainers; [ astro ];
88 };
89}