2022-08-12 12:06:08 +00:00
|
|
|
{ fetchFromGitHub, python3, lib }:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "unifi-protect-backup";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "0.7.4";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ep1cman";
|
|
|
|
repo = pname;
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-4Kpz89yqKmxHmnaPYpvJ2hx46yfcaCYjOioyya+38vE=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
sed -i 's_click = "8.0.1"_click = "^8"_' pyproject.toml
|
|
|
|
sed -i 's_pyunifiprotect = .*_pyunifiprotect = "*"_' pyproject.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
aiocron
|
|
|
|
click
|
|
|
|
pyunifiprotect
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python tool to backup unifi event clips in realtime";
|
|
|
|
homepage = "https://github.com/ep1cman/unifi-protect-backup";
|
|
|
|
maintainers = with maintainers; [ ajs124 ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|