2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchFromGitHub
|
2024-04-21 15:54:59 +00:00
|
|
|
, poetry-core
|
2022-06-16 17:23:12 +00:00
|
|
|
, pybluez
|
2023-07-15 17:15:38 +00:00
|
|
|
, 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-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-07-15 17:15:38 +00:00
|
|
|
pyusb
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
optional-dependencies = {
|
2023-07-15 17:15:38 +00:00
|
|
|
bluetooth = [
|
|
|
|
pybluez
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|