Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6, requests 7, setuptools-scm 8}: 9 10buildPythonPackage rec { 11 pname = "oemthermostat"; 12 version = "1.1.1"; 13 format = "setuptools"; 14 15 disabled = pythonOlder "3.8"; 16 17 src = fetchFromGitHub { 18 owner = "Cadair"; 19 repo = "openenergymonitor_thermostat"; 20 rev = "v${version}"; 21 sha256 = "vrMw3/X8MtejO1WyUA1DOlfVCPTCPgcK5p3+OlTWcM4="; 22 }; 23 24 SETUPTOOLS_SCM_PRETEND_VERSION = version; 25 26 nativeBuildInputs = [ 27 setuptools-scm 28 ]; 29 30 propagatedBuildInputs = [ 31 requests 32 ]; 33 34 nativeCheckInputs = [ 35 pytestCheckHook 36 ]; 37 38 pythonImportsCheck = [ 39 "oemthermostat" 40 ]; 41 42 meta = with lib; { 43 description = "Python module to interact with OpenEnergyMonitor thermostats"; 44 homepage = "https://github.com/Cadair/openenergymonitor_thermostat"; 45 license = licenses.bsd3; 46 maintainers = with maintainers; [ fab ]; 47 }; 48}