1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, fetchFromGitHub
6, nose
7, can
8, canmatrix }:
9
10buildPythonPackage rec {
11 pname = "canopen";
12 version = "0.5.1";
13
14 # use fetchFromGitHub until version containing test/sample.eds
15 # is available on PyPi
16 # https://github.com/christiansandberg/canopen/pull/57
17
18 src = fetchFromGitHub {
19 owner = "christiansandberg";
20 repo = "canopen";
21 rev = "b20575d84c3aef790fe7c38c5fc77601bade0ea4";
22 sha256 = "1qg47qrkyvyxiwi13sickrkk89jp9s91sly2y90bz0jhws2bxh64";
23 };
24
25 #src = fetchPypi {
26 # inherit pname version;
27 # sha256 = "0806cykarpjb9ili3mf82hsd9gdydbks8532nxgz93qzg4zdbv2g";
28 #};
29
30 # test_pdo failure https://github.com/christiansandberg/canopen/issues/58
31 doCheck = false;
32
33 propagatedBuildInputs =
34 [ can
35 canmatrix
36 ];
37
38 checkInputs = [ nose ];
39
40 meta = with lib; {
41 homepage = https://github.com/christiansandberg/canopen/;
42 description = "CANopen stack implementation";
43 license = licenses.lgpl3;
44 maintainers = with maintainers; [ sorki ];
45 };
46}