anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / qnapstats / default.nix
blob88f892c42e36d05660bf41fd47d00ad16d1af35f
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   requests,
6   xmltodict,
7   responses,
8   python,
9 }:
11 buildPythonPackage rec {
12   pname = "qnapstats";
13   version = "0.5.0";
15   format = "setuptools";
17   src = fetchFromGitHub {
18     owner = "colinodell";
19     repo = "python-qnapstats";
20     rev = "refs/tags/${version}";
21     hash = "sha256-dpxl6a61h8zB7eS/2lxG+2//bOTzV6s4T1W+DVj0fnI=";
22   };
24   propagatedBuildInputs = [
25     requests
26     xmltodict
27   ];
29   nativeCheckInputs = [ responses ];
31   checkPhase = ''
32     runHook preCheck
34     ${python.interpreter} tests/test-models.py
36     runHook postCheck
37   '';
39   pythonImportsCheck = [ "qnapstats" ];
41   meta = {
42     description = "Python API for obtaining QNAP NAS system stats";
43     homepage = "https://github.com/colinodell/python-qnapstats";
44     license = lib.licenses.mit;
45     maintainers = with lib.maintainers; [ dotlambda ];
46   };