From 09c5faf7b53a0d0b2dfb0714e77a062b32f02955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 5 May 2022 21:56:59 +0000 Subject: [PATCH] python3Packages.qnapstats: init at 0.4.0 --- .../python-modules/qnapstats/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/qnapstats/default.nix diff --git a/pkgs/development/python-modules/qnapstats/default.nix b/pkgs/development/python-modules/qnapstats/default.nix new file mode 100644 index 000000000000..2eeb4e81d28e --- /dev/null +++ b/pkgs/development/python-modules/qnapstats/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +, xmltodict +, responses +, python +}: + +buildPythonPackage rec { + pname = "qnapstats"; + version = "0.4.0"; + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "colinodell"; + repo = "python-qnapstats"; + rev = version; + hash = "sha256-Tzi2QG1Xw12fLVfV49SPJKdz5VdJ4hQMuCHH8gxcOBE="; + }; + + propagatedBuildInputs = [ + requests + xmltodict + ]; + + checkInputs = [ + responses + ]; + + checkPhase = '' + runHook preCheck + + ${python.interpreter} tests/test-models.py + + runHook postCheck + ''; + + pythonImportsCheck = [ "qnapstats" ]; + + meta = { + description = "Python API for obtaining QNAP NAS system stats"; + homepage = "https://github.com/colinodell/python-qnapstats"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ebd87e812a1..3bb1b36c86f7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8762,6 +8762,8 @@ in { qnap-qsw = callPackage ../development/python-modules/qnap-qsw{ }; + qnapstats = callPackage ../development/python-modules/qnapstats { }; + qrcode = callPackage ../development/python-modules/qrcode { }; qreactor = callPackage ../development/python-modules/qreactor { };