From 930a46ff02da6fcc6e015f31e0f2971214b308dc Mon Sep 17 00:00:00 2001 From: Litchi Pi Date: Mon, 19 Aug 2024 20:45:05 +0200 Subject: [PATCH] mealie: fix relative path in code handling backup Signed-off-by: Litchi Pi (cherry picked from commit 36a456f157f26e4be15070e4a8101e1da14e61bf) --- pkgs/by-name/me/mealie/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/me/mealie/package.nix b/pkgs/by-name/me/mealie/package.nix index 0bd096f7977c3..9d5fc61238938 100644 --- a/pkgs/by-name/me/mealie/package.nix +++ b/pkgs/by-name/me/mealie/package.nix @@ -113,6 +113,15 @@ in pythonpkgs.buildPythonPackage rec { postPatch = '' 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 = let