Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

53 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
amaranth,
pdm-backend,
unstableGitUpdater,
}:
buildPythonPackage rec {
pname = "amaranth-boards";
version = "0-unstable-2025-08-28";
pyproject = true;
# from `pdm show`
realVersion =
let
tag = builtins.elemAt (lib.splitString "-" version) 0;
rev = lib.substring 0 7 src.rev;
in
"${tag}1.dev1+g${rev}";
src = fetchFromGitHub {
owner = "amaranth-lang";
repo = "amaranth-boards";
rev = "7e24efe2f6e95afddd0c1b56f1a9423c48caa472";
# these files change depending on git branch status
postFetch = "rm -f $out/.git_archival.txt $out/.gitattributes";
hash = "sha256-NkeSFmbiu5XtUEv/IfaY0P72SVH82HmERfPAHqIY+z8=";
};
build-system = [ pdm-backend ];
dependencies = [ amaranth ];
preBuild = ''
export PDM_BUILD_SCM_VERSION="${realVersion}"
'';
# no tests
doCheck = false;
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
description = "Board definitions for Amaranth HDL";
homepage = "https://github.com/amaranth-lang/amaranth-boards";
license = licenses.bsd2;
maintainers = with maintainers; [
thoughtpolice
pbsds
];
};
}