summary refs log tree commit diff
path: root/pkgs/development/python-modules/nmigen-boards/default.nix
blob: 55f70f74db94abc447ea62bafadc821e48593bc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib
, buildPythonPackage
, fetchFromGitHub
, nmigen
, setuptools
, setuptools_scm
}:

buildPythonPackage rec {
  pname = "nmigen-boards";
  version = "unstable-2020-02-06";
  # python setup.py --version
  realVersion = "0.1.dev92+g${lib.substring 0 7 src.rev}";

  src = fetchFromGitHub {
    owner = "nmigen";
    repo = "nmigen-boards";
    rev = "f37fe0295035db5f1bf82ed086b2eb349ab3a530";
    sha256 = "16112ahil100anfwggj64nyrj3pf7mngwrjyqyhf2ggxx9ir24cc";
  };

  nativeBuildInputs = [ setuptools_scm ];
  propagatedBuildInputs = [ setuptools nmigen ];

  preBuild = ''
    export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
  '';

  meta = with lib; {
    description = "Board and connector definitions for nMigen";
    homepage = "https://github.com/nmigen/nmigen-boards";
    license = licenses.bsd2;
    maintainers = with maintainers; [ emily ];
  };
}