evcc: 0.131.8 -> 0.131.10 (#364658)
[NixPkgs.git] / pkgs / development / python-modules / amaranth / default.nix
blobebb79d5e9ba9eeb5d5a6013d46018b97b1758f07
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   pdm-backend,
7   jschon,
8   pyvcd,
9   jinja2,
10   importlib-resources,
11   importlib-metadata,
12   git,
14   # for tests
15   pytestCheckHook,
16   sby,
17   yices,
18   yosys,
21 buildPythonPackage rec {
22   pname = "amaranth";
23   format = "pyproject";
24   version = "0.5.3";
25   disabled = pythonOlder "3.8";
27   src = fetchFromGitHub {
28     owner = "amaranth-lang";
29     repo = "amaranth";
30     rev = "refs/tags/v${version}";
31     hash = "sha256-lPQw7fAVM7URdyC/9c/UIYsRxVXrLjvHODvhYBdlkkg=";
32   };
34   postPatch = ''
35     substituteInPlace pyproject.toml \
36       --replace-fail \
37         "pdm-backend~=2.3.0" \
38         "pdm-backend>=2.3.0"
39   '';
41   nativeBuildInputs = [ git ];
42   build-system = [ pdm-backend ];
44   dependencies =
45     [
46       jschon
47       jinja2
48       pyvcd
49     ]
50     ++ lib.optional (pythonOlder "3.9") importlib-resources
51     ++ lib.optional (pythonOlder "3.8") importlib-metadata;
53   nativeCheckInputs = [
54     pytestCheckHook
55     sby
56     yices
57     yosys
58   ];
60   pythonImportsCheck = [ "amaranth" ];
62   meta = with lib; {
63     description = "Modern hardware definition language and toolchain based on Python";
64     mainProgram = "amaranth-rpc";
65     homepage = "https://amaranth-lang.org/docs/amaranth";
66     license = licenses.bsd2;
67     maintainers = with maintainers; [
68       thoughtpolice
69       pbsds
70     ];
71   };