Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / nmigen-soc / default.nix
blobb987557d5f687112d893cc767a1fa2914c552524
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , nmigen
5 , setuptools
6 , setuptools_scm
7 }:
9 buildPythonPackage rec {
10   pname = "nmigen-soc";
11   version = "unstable-2021-02-09";
12   # python setup.py --version
13   realVersion = "0.1.dev43+g${lib.substring 0 7 src.rev}";
15   src = fetchFromGitHub {
16     owner = "nmigen";
17     repo = "nmigen-soc";
18     rev = "ecfad4d9abacf903a525f0a252c38844eda0d2dd";
19     sha256 = "0afmnfs1ms7p1r4c1nc0sfvlcq36zjwaim7775v5i2vajcn3020c";
20   };
22   nativeBuildInputs = [ setuptools_scm ];
23   propagatedBuildInputs = [ setuptools nmigen ];
25   preBuild = ''
26     export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
27   '';
29   meta = with lib; {
30     description = "System on Chip toolkit for nMigen";
31     homepage = "https://github.com/nmigen/nmigen-soc";
32     license = licenses.bsd2;
33     maintainers = with maintainers; [ emily ];
34   };