summary refs log tree commit diff
path: root/pkgs/development/python-modules/nmigen-boards/default.nix
blob: 6e51ae077318c726fbd88d482597a5f2b3a886be (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-2019-10-13";
  # python setup.py --version
  realVersion = "0.1.dev79+g${lib.substring 0 7 src.rev}";

  src = fetchFromGitHub {
    owner = "m-labs";
    repo = "nmigen-boards";
    rev = "835c175d7cf9d143aea2c7dbc0c870ede655cfc2";
    sha256 = "1mbxgfv6k9i3668lr1b3hrvial2vznvgn4ckjzc36hhizp47ypzw";
  };

  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/m-labs/nmigen-boards;
    license = licenses.bsd0;
    maintainers = with maintainers; [ emily ];
  };
}