python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / amaranth-boards / default.nix
blobcfd76b23a8ad768a45ce0ef79ed5224876250010
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   amaranth,
6   pdm-backend,
7   unstableGitUpdater,
8 }:
10 buildPythonPackage rec {
11   pname = "amaranth-boards";
12   version = "0-unstable-2024-10-18";
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-boards";
25     rev = "23c66d68045831de0a372c8c237274d74c71ef4e";
26     # these files change depending on git branch status
27     postFetch = "rm -f $out/.git_archival.txt $out/.gitattributes";
28     hash = "sha256-cC7uvj9+6h3RPbFdu3/T1t/jhw5CuLOF8aKwDSkRE54=";
29   };
31   build-system = [ pdm-backend ];
32   dependencies = [ amaranth ];
34   preBuild = ''
35     export PDM_BUILD_SCM_VERSION="${realVersion}"
36   '';
38   # no tests
39   doCheck = false;
41   passthru.updateScript = unstableGitUpdater { };
43   meta = with lib; {
44     description = "Board definitions for Amaranth HDL";
45     homepage = "https://github.com/amaranth-lang/amaranth-boards";
46     license = licenses.bsd2;
47     maintainers = with maintainers; [
48       thoughtpolice
49       pbsds
50     ];
51   };