biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pyverilog / default.nix
blob9e7077a60f57d9134beab43f9eb4cd1ff2e94dc3
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   pythonOlder,
6   setuptools,
7   jinja2,
8   ply,
9   iverilog,
10   pytestCheckHook,
13 buildPythonPackage rec {
14   pname = "pyverilog";
15   version = "1.3.0";
16   pyproject = true;
18   src = fetchPypi {
19     inherit pname version;
20     sha256 = "1a74k8r21swmfwvgv4c014y6nbcyl229fspxw89ygsgb0j83xnar";
21   };
23   disabled = pythonOlder "3.7";
25   patchPhase = ''
26     # The path to Icarus can still be overridden via an environment variable at runtime.
27     substituteInPlace pyverilog/vparser/preprocessor.py \
28       --replace-fail \
29         "iverilog = 'iverilog'" \
30         "iverilog = '${lib.getExe' iverilog "iverilog"}'"
31   '';
33   build-system = [ setuptools ];
35   dependencies = [
36     jinja2
37     ply
38     iverilog
39   ];
41   preCheck = ''
42     substituteInPlace pytest.ini \
43       --replace-fail "python_paths" "pythonpath"
44   '';
46   nativeCheckInputs = [ pytestCheckHook ];
48   meta = with lib; {
49     homepage = "https://github.com/PyHDI/Pyverilog";
50     description = "Python-based Hardware Design Processing Toolkit for Verilog HDL";
51     license = licenses.asl20;
52     maintainers = with maintainers; [ trepetti ];
53   };