2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pybluez,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyusb,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nxt-python";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.3.0";
|
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "schodet";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-v65KEP5DuJsZAifd1Rh46x9lSAgBZgyo+e8PKSDKnhw=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [ pyusb ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
bluetooth = [ pybluez ];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "nxt" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python driver/interface for Lego Mindstorms NXT robot";
|
|
|
|
homepage = "https://github.com/schodet/nxt-python";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/schodet/nxt-python/releases/tag/${version}";
|
|
|
|
license = licenses.gpl3Only;
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ ibizaman ];
|
|
|
|
};
|
|
|
|
}
|