Merge pull request #113706 from fabaff/pymysensors
This commit is contained in:
commit
a304559fb4
@ -1,5 +1,10 @@
|
|||||||
{ lib, buildPythonPackage, fetchFromGitHub
|
{ lib
|
||||||
, pytest, pytest-benchmark, pytest-mock }:
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pytest-benchmark
|
||||||
|
, pytest-mock
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "getmac";
|
pname = "getmac";
|
||||||
@ -7,19 +12,32 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "GhostofGoes";
|
owner = "GhostofGoes";
|
||||||
repo = "getmac";
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "08d4iv5bjl1s4i9qhzf3pzjgj1rgbwi0x26qypf3ycgdj0a6gvh2";
|
sha256 = "08d4iv5bjl1s4i9qhzf3pzjgj1rgbwi0x26qypf3ycgdj0a6gvh2";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-benchmark pytest-mock ];
|
checkInputs = [
|
||||||
checkPhase = ''
|
pytestCheckHook
|
||||||
pytest --ignore tests/test_cli.py
|
pytest-benchmark
|
||||||
'';
|
pytest-mock
|
||||||
|
];
|
||||||
|
|
||||||
|
disabledTests = [
|
||||||
|
# Disable CLI tests
|
||||||
|
"test_cli_main_basic"
|
||||||
|
"test_cli_main_verbose"
|
||||||
|
"test_cli_main_debug"
|
||||||
|
"test_cli_multiple_debug_levels"
|
||||||
|
# Disable test that require network access
|
||||||
|
"test_uuid_lanscan_iface"
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "getmac" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
description = "Python package to get the MAC address of network interfaces and hosts on the local network";
|
||||||
homepage = "https://github.com/GhostofGoes/getmac";
|
homepage = "https://github.com/GhostofGoes/getmac";
|
||||||
description = "Pure-Python package to get the MAC address of network interfaces and hosts on the local network.";
|
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ colemickens ];
|
maintainers = with maintainers; [ colemickens ];
|
||||||
};
|
};
|
||||||
|
55
pkgs/development/python-modules/pymysensors/default.nix
Normal file
55
pkgs/development/python-modules/pymysensors/default.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, click
|
||||||
|
, crcmod
|
||||||
|
, fetchFromGitHub
|
||||||
|
, getmac
|
||||||
|
, intelhex
|
||||||
|
, paho-mqtt
|
||||||
|
, pyserial
|
||||||
|
, pyserial-asyncio
|
||||||
|
, pytest-sugar
|
||||||
|
, pytest-timeout
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, voluptuous
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pymysensors";
|
||||||
|
version = "0.20.1";
|
||||||
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "theolind";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1hz3551ydsmd23havd0dljmvkhzjnmd28k41ws60s8ms3gzlzqfy";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
click
|
||||||
|
crcmod
|
||||||
|
getmac
|
||||||
|
intelhex
|
||||||
|
paho-mqtt
|
||||||
|
pyserial
|
||||||
|
pyserial-asyncio
|
||||||
|
voluptuous
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytest-sugar
|
||||||
|
pytest-timeout
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "mysensors" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Python API for talking to a MySensors gateway";
|
||||||
|
homepage = "https://github.com/theolind/pymysensors";
|
||||||
|
license = with licenses; [ mit ];
|
||||||
|
maintainers = with maintainers; [ fab ];
|
||||||
|
};
|
||||||
|
}
|
@ -523,7 +523,7 @@
|
|||||||
"mychevy" = ps: with ps; [ ]; # missing inputs: mychevy
|
"mychevy" = ps: with ps; [ ]; # missing inputs: mychevy
|
||||||
"mycroft" = ps: with ps; [ ]; # missing inputs: mycroftapi
|
"mycroft" = ps: with ps; [ ]; # missing inputs: mycroftapi
|
||||||
"myq" = ps: with ps; [ pymyq ];
|
"myq" = ps: with ps; [ pymyq ];
|
||||||
"mysensors" = ps: with ps; [ aiohttp-cors paho-mqtt ]; # missing inputs: pymysensors
|
"mysensors" = ps: with ps; [ aiohttp-cors paho-mqtt pymysensors ];
|
||||||
"mystrom" = ps: with ps; [ aiohttp-cors python-mystrom ];
|
"mystrom" = ps: with ps; [ aiohttp-cors python-mystrom ];
|
||||||
"mythicbeastsdns" = ps: with ps; [ ]; # missing inputs: mbddns
|
"mythicbeastsdns" = ps: with ps; [ ]; # missing inputs: mbddns
|
||||||
"n26" = ps: with ps; [ ]; # missing inputs: n26
|
"n26" = ps: with ps; [ ]; # missing inputs: n26
|
||||||
|
@ -5718,6 +5718,8 @@ in {
|
|||||||
|
|
||||||
pymyq = callPackage ../development/python-modules/pymyq { };
|
pymyq = callPackage ../development/python-modules/pymyq { };
|
||||||
|
|
||||||
|
pymysensors = callPackage ../development/python-modules/pymysensors { };
|
||||||
|
|
||||||
pymysql = callPackage ../development/python-modules/pymysql { };
|
pymysql = callPackage ../development/python-modules/pymysql { };
|
||||||
|
|
||||||
pymysqlsa = callPackage ../development/python-modules/pymysqlsa { };
|
pymysqlsa = callPackage ../development/python-modules/pymysqlsa { };
|
||||||
|
Loading…
Reference in New Issue
Block a user