1{ lib
2, buildPythonPackage
3, fetchPypi
4, setuptools-scm
5, can
6, canmatrix
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "canopen";
13 version = "2.2.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-XxhlG5325HabmILpafk0rnc+8kpFqrwzNLWGmCBI0Iw=";
21 };
22
23 nativeBuildInputs = [
24 setuptools-scm
25 ];
26
27 propagatedBuildInputs = [
28 can
29 canmatrix
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 ];
35
36 pythonImportsCheck = [
37 "canopen"
38 ];
39
40 meta = with lib; {
41 description = "CANopen stack implementation";
42 homepage = "https://github.com/christiansandberg/canopen/";
43 changelog = "https://github.com/christiansandberg/canopen/releases/tag/v${version}";
44 license = licenses.mit;
45 maintainers = with maintainers; [ sorki ];
46 };
47}