nixpkgs/pkgs/development/python-modules/ring-doorbell/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

70 lines
1.3 KiB
Nix

{ lib
, asyncclick
, buildPythonPackage
, fetchPypi
, firebase-messaging
, oauthlib
, poetry-core
, pytest-asyncio
, pytest-mock
, pytest-socket
, pytestCheckHook
, pythonOlder
, pytz
, requests
, requests-mock
, requests-oauthlib
}:
buildPythonPackage rec {
pname = "ring-doorbell";
version = "0.8.8";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
pname = "ring_doorbell";
inherit version;
hash = "sha256-Rz12Qpawi4/u14ywJGt9Yw7IqjYP4bg6zNr9oN3iQxQ=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
asyncclick
oauthlib
pytz
requests
requests-oauthlib
];
passthru.optional-dependencies = {
listen = [
firebase-messaging
];
};
nativeCheckInputs = [
pytest-asyncio
pytest-mock
pytest-socket
pytestCheckHook
requests-mock
];
pythonImportsCheck = [
"ring_doorbell"
];
meta = with lib; {
description = "Python library to communicate with Ring Door Bell";
mainProgram = "ring-doorbell";
homepage = "https://github.com/tchellomello/python-ring-doorbell";
changelog = "https://github.com/tchellomello/python-ring-doorbell/releases/tag/${version}";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ graham33 ];
};
}