about summary refs log tree commit diff
path: root/pkgs/development/python-modules/amaranth/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/amaranth/default.nix')
-rw-r--r--pkgs/development/python-modules/amaranth/default.nix74
1 files changed, 43 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/amaranth/default.nix b/pkgs/development/python-modules/amaranth/default.nix
index 5f2f072558df..ebb79d5e9ba9 100644
--- a/pkgs/development/python-modules/amaranth/default.nix
+++ b/pkgs/development/python-modules/amaranth/default.nix
@@ -1,49 +1,58 @@
-{ lib
-, buildPythonPackage
-, pythonOlder
-, fetchFromGitHub
-, pdm-backend
-, pyvcd
-, jinja2
-, importlib-resources
-, importlib-metadata
-, git
-
-# for tests
-, pytestCheckHook
-, symbiyosys
-, yices
-, yosys
+{
+  lib,
+  buildPythonPackage,
+  pythonOlder,
+  fetchFromGitHub,
+  pdm-backend,
+  jschon,
+  pyvcd,
+  jinja2,
+  importlib-resources,
+  importlib-metadata,
+  git,
+
+  # for tests
+  pytestCheckHook,
+  sby,
+  yices,
+  yosys,
 }:
 
 buildPythonPackage rec {
   pname = "amaranth";
   format = "pyproject";
-  version = "0.4.5";
+  version = "0.5.3";
   disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "amaranth-lang";
     repo = "amaranth";
     rev = "refs/tags/v${version}";
-    hash = "sha256-g9dn6gUTdFHz9GMWHERsRLWHoI3E7vjuQDK0usbZO7g=";
+    hash = "sha256-lPQw7fAVM7URdyC/9c/UIYsRxVXrLjvHODvhYBdlkkg=";
   };
 
-  nativeBuildInputs = [
-    git
-    pdm-backend
-  ];
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace-fail \
+        "pdm-backend~=2.3.0" \
+        "pdm-backend>=2.3.0"
+  '';
+
+  nativeBuildInputs = [ git ];
+  build-system = [ pdm-backend ];
 
-  dependencies = [
-    jinja2
-    pyvcd
-  ] ++
-    lib.optional (pythonOlder "3.9") importlib-resources ++
-    lib.optional (pythonOlder "3.8") importlib-metadata;
+  dependencies =
+    [
+      jschon
+      jinja2
+      pyvcd
+    ]
+    ++ lib.optional (pythonOlder "3.9") importlib-resources
+    ++ lib.optional (pythonOlder "3.8") importlib-metadata;
 
   nativeCheckInputs = [
     pytestCheckHook
-    symbiyosys
+    sby
     yices
     yosys
   ];
@@ -51,10 +60,13 @@ buildPythonPackage rec {
   pythonImportsCheck = [ "amaranth" ];
 
   meta = with lib; {
-    description = "A modern hardware definition language and toolchain based on Python";
+    description = "Modern hardware definition language and toolchain based on Python";
     mainProgram = "amaranth-rpc";
     homepage = "https://amaranth-lang.org/docs/amaranth";
     license = licenses.bsd2;
-    maintainers = with maintainers; [ emily thoughtpolice pbsds ];
+    maintainers = with maintainers; [
+      thoughtpolice
+      pbsds
+    ];
   };
 }