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