mealie: 2.3.0 -> 2.6.0

Changelog: https://github.com/mealie-recipes/mealie/releases/tag/v2.6.0

make mealie build
This commit is contained in:
Alexander Sieg
2025-02-18 13:40:40 +01:00
parent 7e80079af1
commit 1feaad0403
2 changed files with 21 additions and 15 deletions
@@ -0,0 +1,13 @@
diff --git a/mealie/services/openai/openai.py b/mealie/services/openai/openai.py
index 09c391d5..5d74d930 100644
--- a/mealie/services/openai/openai.py
+++ b/mealie/services/openai/openai.py
@@ -7,7 +7,7 @@ from pathlib import Path
from textwrap import dedent
from openai import NOT_GIVEN, AsyncOpenAI
-from openai.resources.chat.completions import ChatCompletion
+from openai.types.chat import ChatCompletion
from pydantic import BaseModel, field_validator
from mealie.core.config import get_app_settings
+8 -15
View File
@@ -10,12 +10,12 @@
}:
let
version = "2.3.0";
version = "2.6.0";
src = fetchFromGitHub {
owner = "mealie-recipes";
repo = "mealie";
rev = "v${version}";
hash = "sha256-GN+uXyZCvDuFmQnXhn0mFans3bvvEw7Uq6V0OeCPEbE=";
tag = "v${version}";
hash = "sha256-txkHCQ/xTakPXXFki161jNOKwAH9p9z1hCNEEkbqQtM=";
};
frontend = callPackage (import ./mealie-frontend.nix src version) { };
@@ -55,6 +55,11 @@ pythonpkgs.buildPythonApplication rec {
pythonRelaxDeps = true;
patches = [
# compatiblity with openai 1.63.0
./0000_openai_1.63.0.patch
];
dependencies = with pythonpkgs; [
aiofiles
alembic
@@ -97,15 +102,6 @@ pythonpkgs.buildPythonApplication rec {
substituteInPlace mealie/__init__.py \
--replace-fail '__version__ = ' '__version__ = "v${version}" #'
substituteInPlace mealie/services/backups_v2/alchemy_exporter.py \
--replace-fail 'PROJECT_DIR = ' "PROJECT_DIR = Path('$out') #"
substituteInPlace mealie/db/init_db.py \
--replace-fail 'PROJECT_DIR = ' "PROJECT_DIR = Path('$out') #"
substituteInPlace mealie/services/backups_v2/alchemy_exporter.py \
--replace-fail '"script_location", path.join(PROJECT_DIR, "alembic")' '"script_location", "${src}/alembic"'
'';
postInstall =
@@ -122,9 +118,6 @@ pythonpkgs.buildPythonApplication rec {
mkdir -p $out/bin $out/libexec
rm -f $out/bin/*
substitute ${src}/alembic.ini $out/alembic.ini \
--replace-fail 'script_location = alembic' 'script_location = ${src}/alembic'
makeWrapper ${start_script} $out/bin/mealie \
--set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath dependencies}" \
--set LD_LIBRARY_PATH "${crfpp}/lib" \