From a231634393af91b2f1e113ed7cb8019763b6b100 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Dec 2022 22:45:47 +0100 Subject: [PATCH] unifi-protect-backup: switch to pythonRelaxDepsHook --- .../backup/unifi-protect-backup/default.nix | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/backup/unifi-protect-backup/default.nix b/pkgs/applications/backup/unifi-protect-backup/default.nix index 16169e98b1ff..d1610516f6f6 100644 --- a/pkgs/applications/backup/unifi-protect-backup/default.nix +++ b/pkgs/applications/backup/unifi-protect-backup/default.nix @@ -1,4 +1,7 @@ -{ fetchFromGitHub, python3, lib }: +{ lib +, fetchFromGitHub +, python3 +}: python3.pkgs.buildPythonApplication rec { pname = "unifi-protect-backup"; @@ -13,15 +16,20 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-Z8qK7LprMyXl5irx9Xrs/RgqvNcFVBqLBSljovr6oiE="; }; - preBuild = '' - sed -i 's_click = "8.0.1"_click = "^8"_' pyproject.toml - sed -i 's_pyunifiprotect = .*_pyunifiprotect = "*"_' pyproject.toml - sed -i 's_aiorun = .*_aiorun = "*"_' pyproject.toml - sed -i '/pylint/d' pyproject.toml - ''; + pythonRelaxDeps = [ + "aiorun" + "aiosqlite" + "click" + "pyunifiprotect" + ]; + + pythonRemoveDeps = [ + "pylint" + ]; nativeBuildInputs = with python3.pkgs; [ poetry-core + pythonRelaxDepsHook ]; propagatedBuildInputs = with python3.pkgs; [ @@ -39,7 +47,8 @@ python3.pkgs.buildPythonApplication rec { 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 ]; + changelog = "https://github.com/ep1cman/unifi-protect-backup/blob/v${version}/CHANGELOG.md"; license = licenses.mit; + maintainers = with maintainers; [ ajs124 ]; }; }