aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/pyuavcan/default.nix
blob: ff01ea90e227a6c728d51d1799e4caafde5b2a97 (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
48
49
50
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, numpy, nunavut
, pyserial , pytest, ruamel_yaml}:

 buildPythonPackage rec {
  pname = "pyuavcan";
  version = "1.1.0.dev1";
  disabled = pythonOlder "3.7"; # only python>=3.7 is supported

  src = fetchFromGitHub {
    owner = "UAVCAN";
    repo = pname;
    rev = version;
    sha256 = "0fmbmdnnh679zkllv5m6pkrasg7m9vjwabqnmz5m7flrgdh6h4qa";
  };

  propagatedBuildInputs = [
    numpy
    nunavut
    pyserial
    pytest
    ruamel_yaml
  ];

  # allow for writable directory for darwin
  preBuild = ''
    export HOME=$TMPDIR
    export PYTHONASYNCIODEBUG=1
  '';

  # tests fail ATM.
  doCheck = false;

  # check at least that import works, as tests fail
  pythonImportsCheck = [
    "pyuavcan"
  ];

  meta = with lib; {
    description = "A full-featured implementation of the UAVCAN protocol stack";
    longDescription = ''
      It is intended for non-embedded, user-facing applications such as GUI
      software, diagnostic tools, automation scripts, prototypes, and various
      R&D cases.  PyUAVCAN consists of a Python library (package) and a simple
      CLI tool for basic diagnostics and shell script automation.
    '';
    homepage = "https://pyuavcan.readthedocs.io";
    maintainers = with maintainers; [ wucke13 ];
    license = licenses.mit;
  };
}