2022-05-24 08:46:14 -07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2023-06-24 19:20:28 +02:00
|
|
|
fetchFromGitHub,
|
2024-03-18 02:11:32 +01:00
|
|
|
poetry-core,
|
2022-05-24 08:46:14 -07:00
|
|
|
pybluez,
|
2023-06-24 19:20:28 +02:00
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pyusb,
|
2022-05-24 08:46:14 -07:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nxt-python";
|
2025-01-19 21:16:51 +01:00
|
|
|
version = "3.5.1";
|
2024-03-18 02:11:32 +01:00
|
|
|
pyproject = true;
|
2022-05-24 08:46:14 -07:00
|
|
|
|
2023-06-24 19:20:28 +02:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "schodet";
|
2025-05-25 03:23:20 +02:00
|
|
|
repo = "nxt-python";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = version;
|
2025-01-19 21:16:51 +01:00
|
|
|
hash = "sha256-ffJ7VhXT5I7i5JYfnjFBaud0CxoVBFWx6kRdAz+Ry00=";
|
2022-05-24 08:46:14 -07:00
|
|
|
};
|
|
|
|
|
2024-03-18 02:11:32 +01:00
|
|
|
build-system = [ poetry-core ];
|
|
|
|
|
|
|
|
dependencies = [ pyusb ];
|
2023-06-24 19:20:28 +02:00
|
|
|
|
2024-03-18 02:11:32 +01:00
|
|
|
optional-dependencies = {
|
2023-06-24 19:20:28 +02:00
|
|
|
bluetooth = [ pybluez ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "nxt" ];
|
2022-05-24 08:46:14 -07:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python driver/interface for Lego Mindstorms NXT robot";
|
|
|
|
homepage = "https://github.com/schodet/nxt-python";
|
2025-01-19 21:16:51 +01:00
|
|
|
changelog = "https://github.com/schodet/nxt-python/releases/tag/${src.tag}";
|
2023-06-24 19:12:44 +02:00
|
|
|
license = licenses.gpl3Only;
|
2022-05-24 08:46:14 -07:00
|
|
|
maintainers = with maintainers; [ ibizaman ];
|
|
|
|
};
|
|
|
|
}
|