841d9c7fc1
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
43 lines
818 B
Nix
43 lines
818 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, requests
|
|
, requests-mock
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "nexia";
|
|
version = "0.9.7";
|
|
disabled = pythonOlder "3.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bdraco";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-1oBrDr8QAUe6LLBliR/sNwDlLuisxOWPeI9sxuJtGxU=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|