3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/nexia/default.nix
2021-07-27 11:32:45 -07:00

44 lines
820 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, requests
, requests-mock
}:
buildPythonPackage rec {
pname = "nexia";
version = "0.9.11";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "bdraco";
repo = pname;
rev = version;
sha256 = "0ql08nfvh6rjhjdh78gzih7az95m0fc9wxc22yqmlc9grifnp9i5";
};
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 ];
};
}