1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, numpy, nunavut
2, pyserial , pytest, ruamel-yaml}:
3
4 buildPythonPackage rec {
5 pname = "pyuavcan";
6 version = "1.1.0.dev1";
7 disabled = pythonOlder "3.7"; # only python>=3.7 is supported
8
9 src = fetchFromGitHub {
10 owner = "UAVCAN";
11 repo = pname;
12 rev = version;
13 hash = "sha256-ChNoYHuZulPLrxYvxeVO9Tyt8rymlk3p/OkYaG2rqzo=";
14 };
15
16 propagatedBuildInputs = [
17 numpy
18 nunavut
19 pyserial
20 pytest
21 ruamel-yaml
22 ];
23
24 # allow for writable directory for darwin
25 preBuild = ''
26 export HOME=$TMPDIR
27 export PYTHONASYNCIODEBUG=1
28 '';
29
30 # tests fail ATM.
31 doCheck = false;
32
33 # check at least that import works, as tests fail
34 pythonImportsCheck = [
35 "pyuavcan"
36 ];
37
38 meta = with lib; {
39 description = "A full-featured implementation of the UAVCAN protocol stack";
40 longDescription = ''
41 It is intended for non-embedded, user-facing applications such as GUI
42 software, diagnostic tools, automation scripts, prototypes, and various
43 R&D cases. PyUAVCAN consists of a Python library (package) and a simple
44 CLI tool for basic diagnostics and shell script automation.
45 '';
46 homepage = "https://pyuavcan.readthedocs.io";
47 maintainers = with maintainers; [ wucke13 ];
48 license = licenses.mit;
49 };
50}