Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, pythonAtLeast 4, pythonOlder 5, fetchFromGitHub 6, unittestCheckHook 7}: 8 9buildPythonPackage rec { 10 pname = "maxcube-api"; 11 version = "0.4.3"; 12 format = "setuptools"; 13 disabled = pythonOlder "3.7"; 14 15 src = fetchFromGitHub { 16 owner = "hackercowboy"; 17 repo = "python-${pname}"; 18 rev = "V${version}"; 19 sha256 = "10k61gfpnqljf3p3qxr97xq7j67a9cr4ivd9v72hdni0znrbx6ym"; 20 }; 21 22 postPatch = '' 23 substituteInPlace setup.py --replace "license=license" "license='MIT'" 24 ''; 25 26 nativeCheckInputs = [ unittestCheckHook ]; 27 28 pythonImportsCheck = [ 29 "maxcube" 30 "maxcube.cube" 31 ]; 32 33 meta = with lib; { 34 # Tests indicate lack of 3.11 compatibility 35 broken = pythonAtLeast "3.11"; 36 description = "eQ-3/ELV MAX! Cube Python API"; 37 homepage = "https://github.com/hackercowboy/python-maxcube-api"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ hexa ]; 40 }; 41}