depot/third_party/nixpkgs/pkgs/development/python-modules/oemthermostat/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

48 lines
917 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, requests
, setuptools-scm
}:
buildPythonPackage rec {
pname = "oemthermostat";
version = "1.1.1";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Cadair";
repo = "openenergymonitor_thermostat";
rev = "v${version}";
sha256 = "vrMw3/X8MtejO1WyUA1DOlfVCPTCPgcK5p3+OlTWcM4=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
requests
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"oemthermostat"
];
meta = with lib; {
description = "Python module to interact with OpenEnergyMonitor thermostats";
homepage = "https://github.com/Cadair/openenergymonitor_thermostat";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}