1{
2 lib,
3 buildPythonPackage,
4 canmatrix,
5 fetchPypi,
6 pytestCheckHook,
7 python-can,
8 setuptools-scm,
9}:
10
11buildPythonPackage rec {
12 pname = "canopen";
13 version = "2.4.1";
14 pyproject = true;
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-IKhLxJizTa3XnOzkZ9O74ZWRwcAqjzkzG8xgZcTYsus=";
19 };
20
21 __darwinAllowLocalNetworking = true;
22
23 build-system = [ setuptools-scm ];
24
25 dependencies = [ python-can ];
26
27 optional-dependencies = {
28 db_export = [ canmatrix ];
29 };
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "canopen" ];
34
35 meta = with lib; {
36 description = "CANopen stack implementation";
37 homepage = "https://github.com/christiansandberg/canopen/";
38 changelog = "https://github.com/christiansandberg/canopen/releases/tag/v${version}";
39 license = licenses.mit;
40 maintainers = with maintainers; [ sorki ];
41 };
42}