depot/third_party/nixpkgs/pkgs/development/python-modules/easyenergy/default.nix
Default email 83405b6dd2 Project import generated by Copybara.
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
2023-03-15 17:39:30 +01:00

61 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytest-freezer
, pytestCheckHook
, pythonOlder
, yarl
}:
buildPythonPackage rec {
pname = "easyenergy";
version = "0.2.1";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-easyenergy";
rev = "refs/tags/v${version}";
hash = "sha256-FjqkePMD55LWLwL6ZWzKwCI0tcYACPdRuci5fy6n02s=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '"0.0.0"' '"${version}"' \
--replace 'addopts = "--cov"' ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-freezer
pytestCheckHook
];
pythonImportsCheck = [
"easyenergy"
];
meta = with lib; {
description = "Module for getting energy/gas prices from easyEnergy";
homepage = "https://github.com/klaasnicolaas/python-easyenergy";
changelog = "https://github.com/klaasnicolaas/python-easyenergy/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}