nixpkgs/pkgs/development/python-modules/nexia/default.nix
2022-01-16 10:27:35 +01:00

49 lines
859 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, requests
, requests-mock
}:
buildPythonPackage rec {
pname = "nexia";
version = "0.9.13";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "bdraco";
repo = pname;
rev = version;
sha256 = "sha256-0VG8tSwbVTIIsQYAEwzQfXLTDy4df/nS/rbHjYo7xf0=";
};
propagatedBuildInputs = [
requests
];
checkInputs = [
requests-mock
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner",' ""
'';
pythonImportsCheck = [
"nexia"
];
meta = with lib; {
description = "Python module for Nexia thermostats";
homepage = "https://github.com/bdraco/nexia";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}