@@ -0,0 +1,42 @@
1+{ lib
2+, buildPythonPackage
3+, pythonOlder
4+, fetchFromGitHub
5+, python
6+}:
7+
8+buildPythonPackage 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+ pythonImportsCheck = [
26+ "maxcube"
27+ "maxcube.cube"
28+ ];
29+
30+ checkPhase = ''
31+ runHook preCheck
32+ ${python.interpreter} -m unittest discover
33+ runHook postCheck
34+ '';
35+
36+ meta = with lib; {
37+ description = "eQ-3/ELV MAX! Cube Python API";
38+ homepage = "https://github.com/hackercowboy/python-maxcube-api";
39+ license = licenses.mit;
40+ maintainers = with maintainers; [ hexa ];
41+ };
42+}