From 73ad01f7d37bdf994b6f02439e931312ebee8524 Mon Sep 17 00:00:00 2001 From: ajs124 Date: Mon, 18 Jul 2022 10:31:12 +0200 Subject: [PATCH] unifi-protect-backup: init at 0.7.1 --- .../backup/unifi-protect-backup/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/applications/backup/unifi-protect-backup/default.nix diff --git a/pkgs/applications/backup/unifi-protect-backup/default.nix b/pkgs/applications/backup/unifi-protect-backup/default.nix new file mode 100644 index 000000000000..07e078b588f5 --- /dev/null +++ b/pkgs/applications/backup/unifi-protect-backup/default.nix @@ -0,0 +1,41 @@ +{ fetchFromGitHub, python3, lib }: + +python3.pkgs.buildPythonApplication rec { + pname = "unifi-protect-backup"; + version = "0.7.1"; + + format = "pyproject"; + + src = fetchFromGitHub { + owner = "ep1cman"; + repo = pname; + rev = "v${version}"; + hash = "sha256-HAiyNFWLs1McrlAB48me/iI15LssO8ec7BiWuJbRlbs="; + }; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 73e62da26105..d82b830e39cf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23120,6 +23120,8 @@ with pkgs; unifi = unifi7; + unifi-protect-backup = callPackage ../applications/backup/unifi-protect-backup { }; + unifi-video = callPackage ../servers/unifi-video { }; unpackerr = callPackage ../servers/unpackerr {