From 967e3dc39cd9054e8615aa8fe36d637a42092361 Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Mon, 8 Jun 2026 13:44:45 +0200 Subject: [PATCH 1/4] mealie: move frontend into package.nix --- pkgs/by-name/me/mealie/mealie-frontend.nix | 68 --------------------- pkgs/by-name/me/mealie/package.nix | 69 +++++++++++++++++++++- 2 files changed, 66 insertions(+), 71 deletions(-) delete mode 100644 pkgs/by-name/me/mealie/mealie-frontend.nix diff --git a/pkgs/by-name/me/mealie/mealie-frontend.nix b/pkgs/by-name/me/mealie/mealie-frontend.nix deleted file mode 100644 index b3359fb64271..000000000000 --- a/pkgs/by-name/me/mealie/mealie-frontend.nix +++ /dev/null @@ -1,68 +0,0 @@ -src: version: -{ - lib, - fetchYarnDeps, - dart-sass, - nodejs, - fixup-yarn-lock, - stdenv, - yarn, - writableTmpDirAsHomeHook, -}: -stdenv.mkDerivation { - name = "mealie-frontend"; - inherit version; - src = "${src}/frontend"; - - yarnOfflineCache = fetchYarnDeps { - yarnLock = "${src}/frontend/yarn.lock"; - hash = "sha256-F1dhdBHfT9N1Ejk7WLyz2BbKlTPfqqEDNi7ZTL3phWY="; - }; - - nativeBuildInputs = [ - fixup-yarn-lock - nodejs - (yarn.override { inherit nodejs; }) - writableTmpDirAsHomeHook - dart-sass - ]; - - configurePhase = '' - runHook preConfigure - - sed -i 's+"@nuxt/fonts",+// NUXT FONTS DISABLED+g' nuxt.config.ts - - yarn config --offline set yarn-offline-mirror "$yarnOfflineCache" - fixup-yarn-lock yarn.lock - yarn install --offline --frozen-lockfile --no-progress --non-interactive --ignore-scripts - patchShebangs node_modules - - substituteInPlace node_modules/sass-embedded/dist/lib/src/compiler-path.js \ - --replace-fail 'compilerCommand = (() => {' 'compilerCommand = (() => { return ["dart-sass"];' - - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - - export NUXT_TELEMETRY_DISABLED=1 - yarn --offline generate - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mv .output/public $out - runHook postInstall - ''; - - meta = { - description = "Frontend for Mealie"; - license = lib.licenses.agpl3Only; - maintainers = with lib.maintainers; [ - litchipi - esch - ]; - }; -} diff --git a/pkgs/by-name/me/mealie/package.nix b/pkgs/by-name/me/mealie/package.nix index 765822f5dfa9..48a7a30fa2d9 100644 --- a/pkgs/by-name/me/mealie/package.nix +++ b/pkgs/by-name/me/mealie/package.nix @@ -1,7 +1,5 @@ { lib, - pkgs, - callPackage, fetchFromGitHub, makeWrapper, nixosTests, @@ -9,6 +7,15 @@ nltk-data, writeShellScript, nix-update-script, + + # frontend + fetchYarnDeps, + dart-sass, + nodejs, + fixup-yarn-lock, + stdenv, + yarn, + writableTmpDirAsHomeHook, }: let @@ -20,7 +27,63 @@ let hash = "sha256-DUwLCe221MQb6AEYNxNDWXoaEdf9q/dNklOXJncnnJ4="; }; - frontend = callPackage (import ./mealie-frontend.nix src version) { }; + frontend = stdenv.mkDerivation { + name = "mealie-frontend"; + inherit version; + src = "${src}/frontend"; + + yarnOfflineCache = fetchYarnDeps { + yarnLock = "${src}/frontend/yarn.lock"; + hash = "sha256-F1dhdBHfT9N1Ejk7WLyz2BbKlTPfqqEDNi7ZTL3phWY="; + }; + + nativeBuildInputs = [ + fixup-yarn-lock + nodejs + (yarn.override { inherit nodejs; }) + writableTmpDirAsHomeHook + dart-sass + ]; + + configurePhase = '' + runHook preConfigure + + sed -i 's+"@nuxt/fonts",+// NUXT FONTS DISABLED+g' nuxt.config.ts + + yarn config --offline set yarn-offline-mirror "$yarnOfflineCache" + fixup-yarn-lock yarn.lock + yarn install --offline --frozen-lockfile --no-progress --non-interactive --ignore-scripts + patchShebangs node_modules + + substituteInPlace node_modules/sass-embedded/dist/lib/src/compiler-path.js \ + --replace-fail 'compilerCommand = (() => {' 'compilerCommand = (() => { return ["dart-sass"];' + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + export NUXT_TELEMETRY_DISABLED=1 + yarn --offline generate + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mv .output/public $out + runHook postInstall + ''; + + meta = { + description = "Frontend for Mealie"; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ + litchipi + esch + ]; + }; + }; python = python3; pythonpkgs = python.pkgs; From f4dc0ef762f66c73124b5e51a712d6a24979a597 Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Mon, 8 Jun 2026 13:53:30 +0200 Subject: [PATCH 2/4] mealie: switch to finalAttrs and structuredAttrs --- pkgs/by-name/me/mealie/package.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/me/mealie/package.nix b/pkgs/by-name/me/mealie/package.nix index 48a7a30fa2d9..5fd9680be008 100644 --- a/pkgs/by-name/me/mealie/package.nix +++ b/pkgs/by-name/me/mealie/package.nix @@ -32,6 +32,8 @@ let inherit version; src = "${src}/frontend"; + __structuredAttrs = true; + yarnOfflineCache = fetchYarnDeps { yarnLock = "${src}/frontend/yarn.lock"; hash = "sha256-F1dhdBHfT9N1Ejk7WLyz2BbKlTPfqqEDNi7ZTL3phWY="; @@ -45,6 +47,10 @@ let dart-sass ]; + env = { + NUXT_TELEMETRY_DISABLED = 1; + }; + configurePhase = '' runHook preConfigure @@ -64,7 +70,6 @@ let buildPhase = '' runHook preBuild - export NUXT_TELEMETRY_DISABLED=1 yarn --offline generate runHook postBuild ''; @@ -88,11 +93,13 @@ let python = python3; pythonpkgs = python.pkgs; in -pythonpkgs.buildPythonApplication rec { +pythonpkgs.buildPythonApplication (finalAttrs: { pname = "mealie"; inherit version src; pyproject = true; + __structuredAttrs = true; + build-system = with pythonpkgs; [ setuptools ]; nativeBuildInputs = [ makeWrapper ]; @@ -175,11 +182,11 @@ pythonpkgs.buildPythonApplication rec { rm -f $out/bin/* makeWrapper ${start_script} $out/bin/mealie \ - --set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath dependencies}" \ + --set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath finalAttrs.passthru.dependencies}" \ --set STATIC_FILES "${frontend}" makeWrapper ${init_db} $out/libexec/init_db \ - --set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath dependencies}" \ + --set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath finalAttrs.passthru.dependencies}" \ --set OUT "$out" ''; @@ -223,4 +230,4 @@ pythonpkgs.buildPythonApplication rec { ]; mainProgram = "mealie"; }; -} +}) From fb1c6281910f6d96d823f85c5ea6d3b5f5b1e42a Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Mon, 8 Jun 2026 14:03:38 +0200 Subject: [PATCH 3/4] mealie: update frontend via update script --- pkgs/by-name/me/mealie/package.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/me/mealie/package.nix b/pkgs/by-name/me/mealie/package.nix index 5fd9680be008..2091aa86aa65 100644 --- a/pkgs/by-name/me/mealie/package.nix +++ b/pkgs/by-name/me/mealie/package.nix @@ -183,7 +183,7 @@ pythonpkgs.buildPythonApplication (finalAttrs: { makeWrapper ${start_script} $out/bin/mealie \ --set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath finalAttrs.passthru.dependencies}" \ - --set STATIC_FILES "${frontend}" + --set STATIC_FILES "${finalAttrs.passthru.frontend}" makeWrapper ${init_db} $out/libexec/init_db \ --set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath finalAttrs.passthru.dependencies}" \ @@ -206,7 +206,13 @@ pythonpkgs.buildPythonApplication (finalAttrs: { ]; passthru = { - updateScript = nix-update-script { }; + inherit frontend; + updateScript = nix-update-script { + extraArgs = [ + "-s" + "frontend" + ]; + }; tests = { inherit (nixosTests) mealie; }; From 6c1076f48007fd119ab5e558eeb67adf4b984ab4 Mon Sep 17 00:00:00 2001 From: Alexander Sieg Date: Mon, 8 Jun 2026 14:05:37 +0200 Subject: [PATCH 4/4] mealie: 3.16.0 -> 3.19.2 --- pkgs/by-name/me/mealie/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/me/mealie/package.nix b/pkgs/by-name/me/mealie/package.nix index 2091aa86aa65..ffcf70e2763f 100644 --- a/pkgs/by-name/me/mealie/package.nix +++ b/pkgs/by-name/me/mealie/package.nix @@ -19,12 +19,12 @@ }: let - version = "3.16.0"; + version = "3.19.2"; src = fetchFromGitHub { owner = "mealie-recipes"; repo = "mealie"; tag = "v${version}"; - hash = "sha256-DUwLCe221MQb6AEYNxNDWXoaEdf9q/dNklOXJncnnJ4="; + hash = "sha256-OH48XiOoaIdVCl5tm22OaI5UKKlhj8b0uVsGlgsjx6I="; }; frontend = stdenv.mkDerivation { @@ -36,7 +36,7 @@ let yarnOfflineCache = fetchYarnDeps { yarnLock = "${src}/frontend/yarn.lock"; - hash = "sha256-F1dhdBHfT9N1Ejk7WLyz2BbKlTPfqqEDNi7ZTL3phWY="; + hash = "sha256-q3dqJrzqEx0G3Q/EGhjVzBd6XTAn6cELfaqLJCD5kFs="; }; nativeBuildInputs = [