Merge pull request #34473 from sorki/python-can-support
Python CAN support
This commit is contained in:
commit
9ba4b1621d
27
pkgs/development/python-modules/can/default.nix
Normal file
27
pkgs/development/python-modules/can/default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, pyserial
|
||||||
|
, nose
|
||||||
|
, mock }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "python-can";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1c6zfd29ck9ffdklfb5xgxvfl52xdaqd89isykkypm1ll97yk2fs";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ pyserial ];
|
||||||
|
checkInputs = [ nose mock ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = https://github.com/hardbyte/python-can;
|
||||||
|
description = "CAN support for Python";
|
||||||
|
license = licenses.lgpl3;
|
||||||
|
maintainers = with maintainers; [ sorki ];
|
||||||
|
};
|
||||||
|
}
|
46
pkgs/development/python-modules/canmatrix/default.nix
Normal file
46
pkgs/development/python-modules/canmatrix/default.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, python
|
||||||
|
, lxml
|
||||||
|
, xlwt
|
||||||
|
, xlrd
|
||||||
|
, XlsxWriter
|
||||||
|
, pyyaml
|
||||||
|
, future }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "canmatrix";
|
||||||
|
version = "0.6";
|
||||||
|
|
||||||
|
# uses fetchFromGitHub as PyPi release misses test/ dir
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ebroecker";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1lb0krhchja2jqfsh5lsfgmqcchs1pd38akvc407jfmll96f4yqz";
|
||||||
|
};
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
cd test
|
||||||
|
${python.interpreter} ./test.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs =
|
||||||
|
[ lxml
|
||||||
|
xlwt
|
||||||
|
xlrd
|
||||||
|
XlsxWriter
|
||||||
|
pyyaml
|
||||||
|
future
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = https://github.com/ebroecker/canmatrix;
|
||||||
|
description = "Support and convert several CAN (Controller Area Network) database formats .arxml .dbc .dbf .kcd .sym fibex xls(x)";
|
||||||
|
license = licenses.bsd2;
|
||||||
|
maintainers = with maintainers; [ sorki ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
46
pkgs/development/python-modules/canopen/default.nix
Normal file
46
pkgs/development/python-modules/canopen/default.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, fetchFromGitHub
|
||||||
|
, nose
|
||||||
|
, can
|
||||||
|
, canmatrix }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "canopen";
|
||||||
|
version = "0.5.1";
|
||||||
|
|
||||||
|
# use fetchFromGitHub until version containing test/sample.eds
|
||||||
|
# is available on PyPi
|
||||||
|
# https://github.com/christiansandberg/canopen/pull/57
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "christiansandberg";
|
||||||
|
repo = "canopen";
|
||||||
|
rev = "b20575d84c3aef790fe7c38c5fc77601bade0ea4";
|
||||||
|
sha256 = "1qg47qrkyvyxiwi13sickrkk89jp9s91sly2y90bz0jhws2bxh64";
|
||||||
|
};
|
||||||
|
|
||||||
|
#src = fetchPypi {
|
||||||
|
# inherit pname version;
|
||||||
|
# sha256 = "0806cykarpjb9ili3mf82hsd9gdydbks8532nxgz93qzg4zdbv2g";
|
||||||
|
#};
|
||||||
|
|
||||||
|
# test_pdo failure https://github.com/christiansandberg/canopen/issues/58
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
propagatedBuildInputs =
|
||||||
|
[ can
|
||||||
|
canmatrix
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [ nose ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = https://github.com/christiansandberg/canopen/;
|
||||||
|
description = "CANopen stack implementation";
|
||||||
|
license = licenses.lgpl3;
|
||||||
|
maintainers = with maintainers; [ sorki ];
|
||||||
|
};
|
||||||
|
}
|
@ -2028,6 +2028,11 @@ in {
|
|||||||
doCheck = false;
|
doCheck = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
can = callPackage ../development/python-modules/can {};
|
||||||
|
|
||||||
|
canopen = callPackage ../development/python-modules/canopen {};
|
||||||
|
|
||||||
|
canmatrix = callPackage ../development/python-modules/canmatrix {};
|
||||||
|
|
||||||
cairocffi = buildPythonPackage rec {
|
cairocffi = buildPythonPackage rec {
|
||||||
name = "cairocffi-0.7.2";
|
name = "cairocffi-0.7.2";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user