Commit 608d1ce6 authored by Litchi Pi's avatar Litchi Pi
Browse files

mealie: 2.8.0 -> 3.0.1



Signed-off-by: default avatarLitchi Pi <litchi.pi@proton.me>
parent 14736ae5
Loading
Loading
Loading
Loading
+17 −11
Original line number Diff line number Diff line
src: version:
{
  lib,
  fetchFromGitHub,
  fetchYarnDeps,
  nodejs_20,
  dart,
  dart-sass,
  nodePackages_latest,
  fixup-yarn-lock,
  stdenv,
  yarn,
}:
stdenv.mkDerivation {
}: let
  nodejs = nodePackages_latest.nodejs;
in stdenv.mkDerivation {
  name = "mealie-frontend";
  inherit version;
  src = "${src}/frontend";

  yarnOfflineCache = fetchYarnDeps {
    yarnLock = "${src}/frontend/yarn.lock";
    hash = "sha256-a2kIOQHaMzaMWId6+SSYN+SPQM2Ipa+F1ztFZgo3R6A=";
    hash = "sha256-712mc/xksjXgnc0inthxE+ztSDl/4107oXw3vKcZD2g=";
  };

  nativeBuildInputs = [
    fixup-yarn-lock
    nodejs_20
    (yarn.override { nodejs = nodejs_20; })
    nodejs
    (yarn.override { inherit nodejs; })
  ];

  configurePhase = ''
    runHook preConfigure

    sed -i 's+"@nuxt/fonts",+// NUXT FONTS DISABLED+g' nuxt.config.ts

    export HOME=$(mktemp -d)
    yarn config --offline set yarn-offline-mirror "$yarnOfflineCache"
    fixup-yarn-lock yarn.lock
    # TODO: Remove --ignore-engines once upstream supports nodejs_20+
    # https://github.com/mealie-recipes/mealie/issues/5400
    # https://github.com/mealie-recipes/mealie/pull/5184
    yarn install --frozen-lockfile --offline --no-progress --non-interactive --ignore-engines
    yarn install --frozen-lockfile --offline --no-progress --non-interactive
    patchShebangs node_modules/

    mkdir -p node_modules/sass-embedded/dist/lib/src/vendor/dart-sass
    ln -s ${dart-sass}/bin/dart-sass node_modules/sass-embedded/dist/lib/src/vendor/dart-sass/sass

    runHook postConfigure
  '';

@@ -50,7 +56,7 @@ stdenv.mkDerivation {

  installPhase = ''
    runHook preInstall
    mv dist $out
    mv .output/public $out
    runHook postInstall
  '';

+116 −121
Original line number Diff line number Diff line
@@ -11,21 +11,19 @@
}:

let
  version = "2.8.0";
  version = "3.0.1";
  src = fetchFromGitHub {
    owner = "mealie-recipes";
    repo = "mealie";
    tag = "v${version}";
    hash = "sha256-0LUT7OdYoOZTdR/UXJO2eL2Afo2Y7GjBPIrjWUt205E=";
    hash = "sha256-ev5S/JGj9lYejuKTRMbZ49qqupJpNF5Vc12VFsJPqpc=";
  };

  frontend = callPackage (import ./mealie-frontend.nix src version) { };

  pythonpkgs = python3Packages;
  python = pythonpkgs.python;
in

pythonpkgs.buildPythonApplication rec {
in pythonpkgs.buildPythonApplication rec {
    pname = "mealie";
    inherit version src;
    pyproject = true;
@@ -46,9 +44,7 @@ pythonpkgs.buildPythonApplication rec {
      apprise
      authlib
      bcrypt
    extruct
      fastapi
    gunicorn
      html2text
      httpx
      ingredient-parser-nlp
@@ -58,12 +54,11 @@ pythonpkgs.buildPythonApplication rec {
      openai
      orjson
      paho-mqtt
    pillow
      pillow-heif
    psycopg2
      pydantic-settings
      pyhumps
      pyjwt
      python-dateutil
      python-dotenv
      python-ldap
      python-multipart