Files
nixpkgs/pkgs/development/python-modules/opower/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

64 lines
1.2 KiB
Nix

{
lib,
aiohttp,
aiozoneinfo,
arrow,
buildPythonPackage,
cryptography,
fetchFromGitHub,
pyotp,
pytest-asyncio,
python-dotenv,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "opower";
version = "0.15.9";
pyproject = true;
src = fetchFromGitHub {
owner = "tronikos";
repo = "opower";
tag = "v${version}";
hash = "sha256-Hqn43KFmte3/zn+f35cxNSLjQ3f7ySPQSVWwMCeQ2Go=";
};
build-system = [ setuptools ];
dependencies = [
aiohttp
aiozoneinfo
arrow
cryptography
pyotp
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
python-dotenv
];
disabledTestPaths = [
# network access
"tests/test_opower.py"
];
pythonImportsCheck = [ "opower" ];
disabledTests = [
# Tests require network access
"test_invalid_auth"
];
meta = {
description = "Module for getting historical and forecasted usage/cost from utilities that use opower.com";
homepage = "https://github.com/tronikos/opower";
changelog = "https://github.com/tronikos/opower/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
}