Files
nixpkgs/pkgs/development/python-modules/amaranth-soc/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

48 lines
1.0 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
amaranth,
pdm-backend,
unstableGitUpdater,
}:
buildPythonPackage rec {
pname = "amaranth-soc";
version = "0.1a-unstable-2024-10-12";
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-soc";
rev = "5c43cf58f15d9cd9c69ff83c97997708d386b2dc";
hash = "sha256-o9xjH/nmV7ovw6bQ6PaFGLcjz5gDGb+eQ9eGNRPnBV8=";
};
build-system = [ pdm-backend ];
dependencies = [ amaranth ];
preBuild = ''
export PDM_BUILD_SCM_VERSION="${realVersion}"
'';
passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; };
meta = {
description = "System on Chip toolkit for Amaranth HDL";
homepage = "https://github.com/amaranth-lang/amaranth-soc";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
thoughtpolice
pbsds
];
};
}