1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 pybluez, 7 pytestCheckHook, 8 pythonOlder, 9 pyusb, 10}: 11 12buildPythonPackage rec { 13 pname = "nxt-python"; 14 version = "3.5.1"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "schodet"; 21 repo = "nxt-python"; 22 tag = version; 23 hash = "sha256-ffJ7VhXT5I7i5JYfnjFBaud0CxoVBFWx6kRdAz+Ry00="; 24 }; 25 26 build-system = [ poetry-core ]; 27 28 dependencies = [ pyusb ]; 29 30 optional-dependencies = { 31 bluetooth = [ pybluez ]; 32 }; 33 34 nativeCheckInputs = [ pytestCheckHook ]; 35 36 pythonImportsCheck = [ "nxt" ]; 37 38 meta = with lib; { 39 description = "Python driver/interface for Lego Mindstorms NXT robot"; 40 homepage = "https://github.com/schodet/nxt-python"; 41 changelog = "https://github.com/schodet/nxt-python/releases/tag/${src.tag}"; 42 license = licenses.gpl3Only; 43 maintainers = with maintainers; [ ibizaman ]; 44 }; 45}