From cf7edf0cc00c2c3d3995b2515c22f3658e206b47 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 24 Jun 2023 19:20:28 +0200 Subject: [PATCH] python311Packages.nxt-python: 3.0.1 -> 3.2.0 Diff: https://github.com/schodet/nxt-python/compare/refs/tags/3.0.1...3.2.0 Changelog: https://github.com/schodet/nxt-python/releases/tag/3.2.0 --- .../python-modules/nxt-python/default.nix | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/nxt-python/default.nix b/pkgs/development/python-modules/nxt-python/default.nix index b26cd1ed4185..fb953bce13dd 100644 --- a/pkgs/development/python-modules/nxt-python/default.nix +++ b/pkgs/development/python-modules/nxt-python/default.nix @@ -1,25 +1,43 @@ { lib , buildPythonPackage -, fetchgit -, isPy3k -, pyusb +, fetchFromGitHub , pybluez -, pytest -, git +, pytestCheckHook +, pythonOlder +, pyusb }: buildPythonPackage rec { - version = "3.0.1"; pname = "nxt-python"; + version = "3.2.0"; format = "setuptools"; - src = fetchgit { - url = "https://github.com/schodet/nxt-python.git"; - rev = version; - sha256 = "004c0dr6767bjiddvp0pchcx05falhjzj33rkk03rrl0ha2nhxvz"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "schodet"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-PWeR8xteLMxlOHcJJCtTI0o8QNzwGJVkUACmvf4tXWY="; }; - propagatedBuildInputs = [ pyusb pybluez pytest git ]; + propagatedBuildInputs = [ + pyusb + ]; + + passthru.optional-dependencies = { + bluetooth = [ + pybluez + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "nxt" + ]; meta = with lib; { description = "Python driver/interface for Lego Mindstorms NXT robot";