unifi-protect-backup: switch to pythonRelaxDepsHook

This commit is contained in:
Fabian Affolter 2022-12-28 22:45:47 +01:00
parent abbb7c5337
commit a231634393

View File

@ -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 ];
};
}