summaryrefslogtreecommitdiff
path: root/nix/peakrdl/peakrdl-regblock.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-05-05 18:19:50 -0600
committerAlejandro Soto <alejandro@34project.org>2024-05-05 18:21:57 -0600
commit1ffcdb62cd7e95ccd3f971d0b5cb2e617e1481b2 (patch)
tree1c0f622359012e0790626e83bcca66d498b2b938 /nix/peakrdl/peakrdl-regblock.nix
parentca02833f22b08ceeeff501107371aa6667426115 (diff)
nix: patch peakrdl-regblock to silence verilator's MULTIDRIVEN warning
Diffstat (limited to 'nix/peakrdl/peakrdl-regblock.nix')
-rw-r--r--nix/peakrdl/peakrdl-regblock.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nix/peakrdl/peakrdl-regblock.nix b/nix/peakrdl/peakrdl-regblock.nix
new file mode 100644
index 0000000..3a3f0f6
--- /dev/null
+++ b/nix/peakrdl/peakrdl-regblock.nix
@@ -0,0 +1,42 @@
+{ buildPythonPackage
+, callPackage
+, fetchPypi
+, jinja2
+, lib
+, setuptools
+, setuptools-scm
+}:
+let
+ pname = "peakrdl-regblock";
+ version = "0.22.0";
+in
+buildPythonPackage {
+ inherit pname version;
+ format = "pyproject";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "sha256-N+YZSuHdSSMCmgko5YZpa7wDj3vMy2J7prPdfjj53GA=";
+ };
+
+ patches = [
+ ./0001-Add-verilator-MULTIDRIVEN-hack.patch
+ ];
+
+ propagatedBuildInputs = [
+ jinja2
+ (callPackage ./systemrdl-compiler.nix { })
+ ];
+
+ propagatedNativeBuildInputs = [
+ setuptools
+ setuptools-scm
+ ];
+
+ meta = {
+ description = "Compile SystemRDL into a SystemVerilog control/status register (CSR) block";
+ changelog = "https://github.com/SystemRDL/${pname}/releases/tag/v${version}";
+ homepage = "https://github.com/SystemRDL/${pname}";
+ license = lib.licenses.gpl3;
+ };
+}