1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7 requests, 8 setuptools-scm, 9}: 10 11buildPythonPackage rec { 12 pname = "oemthermostat"; 13 version = "1.1.1"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "Cadair"; 20 repo = "openenergymonitor_thermostat"; 21 tag = "v${version}"; 22 hash = "sha256-vrMw3/X8MtejO1WyUA1DOlfVCPTCPgcK5p3+OlTWcM4="; 23 }; 24 25 build-system = [ setuptools-scm ]; 26 27 dependencies = [ requests ]; 28 29 nativeCheckInputs = [ pytestCheckHook ]; 30 31 pythonImportsCheck = [ "oemthermostat" ]; 32 33 meta = with lib; { 34 description = "Python module to interact with OpenEnergyMonitor thermostats"; 35 homepage = "https://github.com/Cadair/openenergymonitor_thermostat"; 36 changelog = "https://github.com/Cadair/openenergymonitor_thermostat/blob/v${version}/CHANGELOG.rst"; 37 license = licenses.bsd3; 38 maintainers = with maintainers; [ fab ]; 39 }; 40}