blob: 83764d4dc228f2cc4ea91480ada25806356354e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
pdm-backend,
jschon,
pyvcd,
jinja2,
git,
# for tests
pytestCheckHook,
sby,
yices,
yosys,
}:
buildPythonPackage rec {
pname = "amaranth";
version = "0.5.8";
pyproject = true;
src = fetchFromGitHub {
owner = "amaranth-lang";
repo = "amaranth";
tag = "v${version}";
hash = "sha256-hqMgyQJRz1/5C9KB3nAI2RKPZXZUl3zhfZbk9M1hTxs=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "pdm-backend~=2.3.0" "pdm-backend>=2.3.0"
'';
nativeBuildInputs = [ git ];
build-system = [ pdm-backend ];
dependencies = [
jschon
jinja2
pyvcd
];
nativeCheckInputs = [
pytestCheckHook
sby
yices
yosys
];
pythonImportsCheck = [ "amaranth" ];
disabledTests = [
"verilog"
"test_reversible"
"test_distance"
];
disabledTestPaths = [
# Subprocesses
"tests/test_examples.py"
# Verification failures
"tests/test_lib_fifo.py"
];
meta = {
description = "Modern hardware definition language and toolchain based on Python";
homepage = "https://amaranth-lang.org/docs/amaranth";
changelog = "https://github.com/amaranth-lang/amaranth/blob/${src.tag}/docs/changes.rst";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
thoughtpolice
pbsds
];
mainProgram = "amaranth-rpc";
};
}
|