ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / amaranth-soc / default.nix
blobe90137ba22b72735358f2e75b4a6f4daa154365b
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , amaranth
5 , setuptools
6 , setuptools-scm
7 }:
9 buildPythonPackage rec {
10   pname = "amaranth-soc";
11   version = "unstable-2021-12-10";
12   # python setup.py --version
13   realVersion = "0.1.dev49+g${lib.substring 0 7 src.rev}";
15   src = fetchFromGitHub {
16     owner = "amaranth-lang";
17     repo = "amaranth-soc";
18     rev = "217d4ea76ad3b3bbf146980d168bc7b3b9d95a18";
19     sha256 = "dMip82L7faUn16RDeG3NgMv0nougpwTwDWLX0doD2YA=";
20   };
22   nativeBuildInputs = [ setuptools-scm ];
23   propagatedBuildInputs = [ setuptools amaranth ];
25   preBuild = ''
26     export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
27   '';
29   meta = with lib; {
30     description = "System on Chip toolkit for Amaranth HDL";
31     homepage = "https://github.com/amaranth-lang/amaranth-soc";
32     license = licenses.bsd2;
33     maintainers = with maintainers; [ emily thoughtpolice ];
34   };