aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/nmigen/default.nix
blob: 3cb2056c7cfc6fc9df4e2ec6a5f062449a2bf432 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, setuptools
, setuptools_scm
, pyvcd
, jinja2

# for tests
, yosys
, symbiyosys
, yices
}:

buildPythonPackage rec {
  pname = "nmigen";
  version = "unstable-2019-02-08";
  # python setup.py --version
  realVersion = "0.2.dev49+g${lib.substring 0 7 src.rev}";

  src = fetchFromGitHub {
    owner = "nmigen";
    repo = "nmigen";
    rev = "66f4510c4465be5d0763d7835770553434e4ee91";
    sha256 = "19y39c4ywckm4yzrpjzcdl9pqy9d1sf1zsb4zpzajpmnfqccc3b0";
  };

  disabled = pythonOlder "3.6";

  nativeBuildInputs = [ setuptools_scm ];

  propagatedBuildInputs = [ setuptools pyvcd jinja2 ];

  checkInputs = [ yosys symbiyosys yices ];

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

  meta = with lib; {
    description = "A refreshed Python toolbox for building complex digital hardware";
    homepage = "https://github.com/nmigen/nmigen";
    license = licenses.bsd2;
    maintainers = with maintainers; [ emily ];
  };
}