Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / qnapstats / default.nix
blobe42b0753bd3e6d83f6a2c00fdb040409c77b4ff0
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , requests
5 , xmltodict
6 , responses
7 , python
8 }:
10 buildPythonPackage rec {
11   pname = "qnapstats";
12   version = "0.5.0";
14   format = "setuptools";
16   src = fetchFromGitHub {
17     owner = "colinodell";
18     repo = "python-qnapstats";
19     rev = "refs/tags/${version}";
20     hash = "sha256-dpxl6a61h8zB7eS/2lxG+2//bOTzV6s4T1W+DVj0fnI=";
21   };
23   propagatedBuildInputs = [
24     requests
25     xmltodict
26   ];
28   nativeCheckInputs = [
29     responses
30   ];
32   checkPhase = ''
33     runHook preCheck
35     ${python.interpreter} tests/test-models.py
37     runHook postCheck
38   '';
40   pythonImportsCheck = [ "qnapstats" ];
42   meta = {
43     description = "Python API for obtaining QNAP NAS system stats";
44     homepage = "https://github.com/colinodell/python-qnapstats";
45     license = lib.licenses.mit;
46     maintainers = with lib.maintainers; [ dotlambda ];
47   };