Files
nixpkgs/pkgs/development/python-modules/open-meteo/default.nix
T
Michael Daniels 075e8c2c4f treewide: change 'format = "pyproject";' to 'pyproject = true;'
This is almost all find-and-replace.

I manually edited:
* pkgs/development/python-modules/notifications-android-tv/default.nix,
* pkgs/servers/home-assistant/default.nix,
* pkgs/development/tools/continuous-integration/buildbot/master.nix

A few files have not been changed in this PR because they would cause rebuilds.

This PR should have 0 rebuilds.
2026-01-12 17:50:35 -05:00

66 lines
1.3 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
mashumaro,
orjson,
poetry-core,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "open-meteo";
version = "0.4.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "frenck";
repo = "python-open-meteo";
rev = "v${version}";
hash = "sha256-J106XeSglyqrFfP1ckbnDwfE7IikaNiBQ+m14PE2SBc=";
};
postPatch = ''
# Upstream doesn't set a version for the pyproject.toml
substituteInPlace pyproject.toml \
--replace-fail "0.0.0" "${version}" \
'';
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
aiohttp
mashumaro
orjson
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytestCheckHook
];
disabledTests = [
# aiohttp api breakage
"test_timeout"
];
pythonImportsCheck = [ "open_meteo" ];
meta = {
changelog = "https://github.com/frenck/python-open-meteo/releases/tag/v${version}";
description = "Python client for the Open-Meteo API";
homepage = "https://github.com/frenck/python-open-meteo";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}