{ 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 ]; }; }