From 283a7184415f8b679d1eecf12b5fdf4e265d52c5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 29 Aug 2025 15:45:07 +0200 Subject: [PATCH] frigate: pin joserfc at 1.1.0 Breaking changes in newer versions break frigate at runtime as visible in the nixos test. --- pkgs/by-name/fr/frigate/package.nix | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/fr/frigate/package.nix b/pkgs/by-name/fr/frigate/package.nix index 3c6c9d9b3660..27f584f6a7bc 100644 --- a/pkgs/by-name/fr/frigate/package.nix +++ b/pkgs/by-name/fr/frigate/package.nix @@ -27,7 +27,20 @@ let inherit version src; }; - python = python312Packages.python; + python = python312Packages.python.override { + packageOverrides = self: super: { + joserfc = super.joserfc.overridePythonAttrs (oldAttrs: { + version = "1.1.0"; + src = fetchFromGitHub { + owner = "authlib"; + repo = "joserfc"; + tag = version; + hash = "sha256-95xtUzzIxxvDtpHX/5uCHnTQTB8Fc08DZGUOR/SdKLs="; + }; + }); + }; + }; + python3Packages = python.pkgs; # Tensorflow audio model # https://github.com/blakeblackshear/frigate/blob/v0.15.0/docker/main/Dockerfile#L125 @@ -56,7 +69,7 @@ let hash = "sha256-5Cj2vEiWR8Z9d2xBmVoLZuNRv4UOuxHSGZQWTJorXUQ="; }; in -python312Packages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "frigate"; inherit version; format = "other"; @@ -109,7 +122,7 @@ python312Packages.buildPythonApplication rec { dontBuild = true; - dependencies = with python312Packages; [ + dependencies = with python3Packages; [ # docker/main/requirements.txt scikit-build # docker/main/requirements-wheel.txt @@ -191,7 +204,7 @@ python312Packages.buildPythonApplication rec { runHook postInstall ''; - nativeCheckInputs = with python312Packages; [ + nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; @@ -213,7 +226,7 @@ python312Packages.buildPythonApplication rec { passthru = { web = frigate-web; inherit python; - pythonPath = (python312Packages.makePythonPath dependencies) + ":${frigate}/${python.sitePackages}"; + pythonPath = (python3Packages.makePythonPath dependencies) + ":${frigate}/${python.sitePackages}"; tests = { inherit (nixosTests) frigate; };