evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / amaranth-soc / default.nix
bloba33128a376d1cae79ae6a5d8dfde75ff56ba3312
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   amaranth,
6   pdm-backend,
7   unstableGitUpdater,
8 }:
10 buildPythonPackage rec {
11   pname = "amaranth-soc";
12   version = "0.1a-unstable-2024-10-12";
13   pyproject = true;
14   # from `pdm show`
15   realVersion =
16     let
17       tag = builtins.elemAt (lib.splitString "-" version) 0;
18       rev = lib.substring 0 7 src.rev;
19     in
20     "${tag}1.dev1+g${rev}";
22   src = fetchFromGitHub {
23     owner = "amaranth-lang";
24     repo = "amaranth-soc";
25     rev = "5c43cf58f15d9cd9c69ff83c97997708d386b2dc";
26     hash = "sha256-o9xjH/nmV7ovw6bQ6PaFGLcjz5gDGb+eQ9eGNRPnBV8=";
27   };
29   build-system = [ pdm-backend ];
30   dependencies = [ amaranth ];
32   preBuild = ''
33     export PDM_BUILD_SCM_VERSION="${realVersion}"
34   '';
36   passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; };
38   meta = with lib; {
39     description = "System on Chip toolkit for Amaranth HDL";
40     homepage = "https://github.com/amaranth-lang/amaranth-soc";
41     license = licenses.bsd2;
42     maintainers = with maintainers; [
43       thoughtpolice
44       pbsds
45     ];
46   };