depot/third_party/nixpkgs/pkgs/development/python-modules/qnapstats/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

48 lines
873 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
, xmltodict
, responses
, python
}:
buildPythonPackage rec {
pname = "qnapstats";
version = "0.5.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "colinodell";
repo = "python-qnapstats";
rev = "refs/tags/${version}";
hash = "sha256-dpxl6a61h8zB7eS/2lxG+2//bOTzV6s4T1W+DVj0fnI=";
};
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 ];
};
}