Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / nxt-python / default.nix
blobfb953bce13ddf402696e299c2fbeba0892e1bf15
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pybluez
5 , pytestCheckHook
6 , pythonOlder
7 , pyusb
8 }:
10 buildPythonPackage rec {
11   pname = "nxt-python";
12   version = "3.2.0";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "schodet";
19     repo = pname;
20     rev = "refs/tags/${version}";
21     hash = "sha256-PWeR8xteLMxlOHcJJCtTI0o8QNzwGJVkUACmvf4tXWY=";
22   };
24   propagatedBuildInputs = [
25     pyusb
26   ];
28   passthru.optional-dependencies = {
29     bluetooth = [
30       pybluez
31     ];
32   };
34   nativeCheckInputs = [
35     pytestCheckHook
36   ];
38   pythonImportsCheck = [
39     "nxt"
40   ];
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   };