2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
amaranth,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
2024-06-20 14:57:18 +00:00
|
|
|
unstableGitUpdater,
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "amaranth-boards";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0-unstable-2024-05-01";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-01-13 20:06:32 +00:00
|
|
|
# python setup.py --version
|
|
|
|
realVersion = "0.1.dev202+g${lib.substring 0 7 src.rev}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amaranth-lang";
|
|
|
|
repo = "amaranth-boards";
|
2024-06-20 14:57:18 +00:00
|
|
|
rev = "aba2300dc83216523e1c98fdb22471cb4bac5027";
|
2024-06-24 18:47:55 +00:00
|
|
|
# these files change depending on git branch status
|
|
|
|
postFetch = "rm -f $out/.git_archival.txt $out/.gitattributes";
|
|
|
|
hash = "sha256-jldXyMJtuSGcZKmtwpZBYrR/UBe4ufblPYRYpBmReM8=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
dependencies = [
|
|
|
|
setuptools
|
|
|
|
amaranth
|
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Board definitions for Amaranth HDL";
|
|
|
|
homepage = "https://github.com/amaranth-lang/amaranth-boards";
|
|
|
|
license = licenses.bsd2;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
thoughtpolice
|
|
|
|
pbsds
|
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
}
|