5e7c2d6cef
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{ lib
|
|
, aiohttp
|
|
, aresponses
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, poetry-core
|
|
, pytest-aiohttp
|
|
, pytest-asyncio
|
|
, pytest-mock
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, typing-extensions
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "regenmaschine";
|
|
version = "2023.08.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bachya";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-2czpPLTJOUxjzG0+aOyY01jfwlcRgoHiQdB6ybQ6gWg=";
|
|
};
|
|
|
|
patches = [
|
|
# This patch removes references to setuptools and wheel that are no longer
|
|
# necessary and changes poetry to poetry-core, so that we don't need to add
|
|
# unnecessary nativeBuildInputs.
|
|
#
|
|
# https://github.com/bachya/regenmaschine/pull/334
|
|
#
|
|
(fetchpatch {
|
|
name = "clean-up-build-dependencies.patch";
|
|
url = "https://github.com/bachya/regenmaschine/commit/ecc2f771e2ae2e0a8d46f5beab072df4e4727ba3.patch";
|
|
hash = "sha256-RLRbHmaR2A8MNc96WHx0L8ccyygoBUaOulAuRJkFuUM=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
aresponses
|
|
pytest-aiohttp
|
|
pytest-asyncio
|
|
pytest-mock
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# Examples are prefix with test_
|
|
"examples/"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"regenmaschine"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = with lib; {
|
|
description = "Python library for interacting with RainMachine smart sprinkler controllers";
|
|
homepage = "https://github.com/bachya/regenmaschine";
|
|
changelog = "https://github.com/bachya/regenmaschine/releases/tag/${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|