about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/edalize/default.nix
blob: 9455cdc1b81df7868017e23cde602a8171a811b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{ lib
, buildPythonPackage
, fetchFromGitHub
, coreutils
, jinja2
, pandas
, pyparsing
, pytestCheckHook
, pythonOlder
, which
, yosys
}:

buildPythonPackage rec {
  pname = "edalize";
  version = "0.5.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "olofk";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-jsrJr/iuezh9/KL0PykWB1XKev4Wr5QeDh0ZWNMZSp8=";
  };

  postPatch = ''
    substituteInPlace tests/test_edam.py \
      --replace /usr/bin/touch ${coreutils}/bin/touch
    patchShebangs tests/mock_commands/vsim
  '';

  propagatedBuildInputs = [
    jinja2
  ];

  passthru.optional-dependencies = {
    reporting = [
      pandas
      pyparsing
    ];
  };

  nativeCheckInputs = [
    pytestCheckHook
    which
    yosys
  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

  pythonImportsCheck = [
    "edalize"
  ];

  disabledTestPaths = [
    "tests/test_questa_formal.py"
    "tests/test_slang.py"
    "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";
    changelog = "https://github.com/olofk/edalize/releases/tag/v${version}";
    license = licenses.bsd2;
    maintainers = with maintainers; [ astro ];
  };
}