2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, amaranth
|
2024-04-21 15:54:59 +00:00
|
|
|
, pdm-backend
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "amaranth-soc";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0-unstable-2024-02-16";
|
|
|
|
pyproject = true;
|
|
|
|
# from `pdm show`
|
|
|
|
realVersion = "0.1a1.dev1+g${lib.substring 0 7 src.rev}";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amaranth-lang";
|
|
|
|
repo = "amaranth-soc";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "9f46553aa4289e2a11788a73fade6410a371b162";
|
|
|
|
hash = "sha256-ZllDSrZEu16jZtbQ7crQSj3XCbsthueXtaAvyf45dmY=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [ pdm-backend ];
|
|
|
|
propagatedBuildInputs = [ amaranth ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
export PDM_BUILD_SCM_VERSION="${realVersion}"
|
2022-01-13 20:06:32 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "System on Chip toolkit for Amaranth HDL";
|
|
|
|
homepage = "https://github.com/amaranth-lang/amaranth-soc";
|
|
|
|
license = licenses.bsd2;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ emily thoughtpolice pbsds ];
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
}
|