diff --git a/pkgs/development/python-modules/routeros-api/default.nix b/pkgs/development/python-modules/routeros-api/default.nix index 1f5812b44c1a..2d6208ce27b1 100644 --- a/pkgs/development/python-modules/routeros-api/default.nix +++ b/pkgs/development/python-modules/routeros-api/default.nix @@ -2,36 +2,40 @@ lib, buildPythonPackage, fetchFromGitHub, - six, + pythonOlder, mock, + setuptools, tox, }: buildPythonPackage rec { pname = "routeros-api"; - version = "0.17.0"; - format = "setuptools"; + version = "0.18.1"; + pyproject = true; + + disabled = pythonOlder "3.9"; - # N.B. The version published on PyPI is missing tests. src = fetchFromGitHub { owner = "socialwifi"; - repo = pname; - rev = version; - sha256 = "wpIfeYZ1w/yoNCHLYFVjn0O4Rb+N5lfvYzhGuN+HDTA="; + repo = "routeros-api"; + rev = "refs/tags/${version}"; + hash = "sha256-6IpoByG3YhHh2dPS18ufaoI1vzTZBsZa9WNHS/fImrg="; }; + build-system = [ setuptools ]; + nativeCheckInputs = [ mock tox ]; - propagatedBuildInputs = [ six ]; + pythonImportsCheck = [ "routeros_api" ]; meta = with lib; { - description = "Python API to RouterBoard devices produced by MikroTik."; + description = "Python API to RouterBoard devices produced by MikroTik"; homepage = "https://github.com/socialwifi/RouterOS-api"; + changelog = "https://github.com/socialwifi/RouterOS-api/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ quentin ]; - platforms = platforms.all; }; }