1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "maxcube-api";
10 version = "0.4.3";
11 format = "setuptools";
12 disabled = pythonOlder "3.7";
13
14 src = fetchFromGitHub {
15 owner = "hackercowboy";
16 repo = "python-${pname}";
17 rev = "V${version}";
18 sha256 = "10k61gfpnqljf3p3qxr97xq7j67a9cr4ivd9v72hdni0znrbx6ym";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.py --replace "license=license" "license='MIT'"
23 '';
24
25 nativeCheckInputs = [
26 pytestCheckHook
27 ];
28
29 disabledTests = [
30 "testSendRadioMsgClosesConnectionOnErrorAndRetriesIfReusingConnection"
31 "testSendRadioMsgReusesConnection"
32 ];
33
34 pythonImportsCheck = [
35 "maxcube"
36 "maxcube.cube"
37 ];
38
39 meta = with lib; {
40 description = "eQ-3/ELV MAX! Cube Python API";
41 homepage = "https://github.com/hackercowboy/python-maxcube-api";
42 license = licenses.mit;
43 maintainers = with maintainers; [ hexa ];
44 };
45}