1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 amaranth,
6 setuptools,
7 setuptools-scm,
8}:
9
10buildPythonPackage rec {
11 pname = "amaranth-boards";
12 version = "0-unstable-2023-12-13";
13 pyproject = true;
14 # python setup.py --version
15 realVersion = "0.1.dev202+g${lib.substring 0 7 src.rev}";
16
17 src = fetchFromGitHub {
18 owner = "amaranth-lang";
19 repo = "amaranth-boards";
20 rev = "170675812b71ee722bcf8ccdb88409a9ad97ffe2";
21 hash = "sha256-dwZCKMJnEY9RjzkcJ9r3TEC7W+Wfi/P7Hjl4/d60/qo=";
22 };
23
24 nativeBuildInputs = [
25 setuptools
26 setuptools-scm
27 ];
28 dependencies = [
29 setuptools
30 amaranth
31 ];
32
33 preBuild = ''
34 export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
35 '';
36
37 # no tests
38 doCheck = false;
39
40 meta = with lib; {
41 description = "Board definitions for Amaranth HDL";
42 homepage = "https://github.com/amaranth-lang/amaranth-boards";
43 license = licenses.bsd2;
44 maintainers = with maintainers; [
45 emily
46 thoughtpolice
47 pbsds
48 ];
49 };
50}