nixpkgs/pkgs/development/python-modules/pyverilog/default.nix
Henner Zeller 61f0a17d3c verilog: rename to actual name iverilog
The iverilog project is commonly known as ... iverilog, not verilog.
The package name `verilog` so far has been confusing, rename to `iverilog`.

While doing so, move the package to the new by-name/ convention directory.
Fix all the fall-out of packages that referred to the old name.
2024-07-15 08:36:13 -07:00

49 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
jinja2,
ply,
iverilog,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pyverilog";
version = "1.3.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "1a74k8r21swmfwvgv4c014y6nbcyl229fspxw89ygsgb0j83xnar";
};
disabled = pythonOlder "3.7";
patchPhase = ''
# The path to Icarus can still be overridden via an environment variable at runtime.
substituteInPlace pyverilog/vparser/preprocessor.py \
--replace "iverilog = 'iverilog'" "iverilog = '${iverilog}/bin/iverilog'"
'';
propagatedBuildInputs = [
jinja2
ply
iverilog
];
preCheck = ''
substituteInPlace pytest.ini \
--replace "python_paths" "pythonpath"
'';
nativeCheckInputs = [ pytestCheckHook ];
meta = with lib; {
homepage = "https://github.com/PyHDI/Pyverilog";
description = "Python-based Hardware Design Processing Toolkit for Verilog HDL";
license = licenses.asl20;
maintainers = with maintainers; [ trepetti ];
};
}