mealie: 3.16.0 -> 3.19.3 (#529500)

This commit is contained in:
xanderio
2026-06-24 07:53:56 +00:00
committed by GitHub
2 changed files with 87 additions and 79 deletions
@@ -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
];
};
}
+87 -11
View File
@@ -1,7 +1,5 @@
{
lib,
pkgs,
callPackage,
fetchFromGitHub,
makeWrapper,
nixosTests,
@@ -9,27 +7,99 @@
nltk-data,
writeShellScript,
nix-update-script,
# frontend
fetchYarnDeps,
dart-sass,
nodejs,
fixup-yarn-lock,
stdenv,
yarn,
writableTmpDirAsHomeHook,
}:
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 = callPackage (import ./mealie-frontend.nix src version) { };
frontend = stdenv.mkDerivation {
name = "mealie-frontend";
inherit version;
src = "${src}/frontend";
__structuredAttrs = true;
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${src}/frontend/yarn.lock";
hash = "sha256-q3dqJrzqEx0G3Q/EGhjVzBd6XTAn6cELfaqLJCD5kFs=";
};
nativeBuildInputs = [
fixup-yarn-lock
nodejs
(yarn.override { inherit nodejs; })
writableTmpDirAsHomeHook
dart-sass
];
env = {
NUXT_TELEMETRY_DISABLED = 1;
};
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
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;
in
pythonpkgs.buildPythonApplication rec {
pythonpkgs.buildPythonApplication (finalAttrs: {
pname = "mealie";
inherit version src;
pyproject = true;
__structuredAttrs = true;
build-system = with pythonpkgs; [ setuptools ];
nativeBuildInputs = [ makeWrapper ];
@@ -112,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 STATIC_FILES "${frontend}"
--set PYTHONPATH "$out/${python.sitePackages}:${pythonpkgs.makePythonPath finalAttrs.passthru.dependencies}" \
--set STATIC_FILES "${finalAttrs.passthru.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"
'';
@@ -136,7 +206,13 @@ pythonpkgs.buildPythonApplication rec {
];
passthru = {
updateScript = nix-update-script { };
inherit frontend;
updateScript = nix-update-script {
extraArgs = [
"-s"
"frontend"
];
};
tests = {
inherit (nixosTests) mealie;
};
@@ -160,4 +236,4 @@ pythonpkgs.buildPythonApplication rec {
];
mainProgram = "mealie";
};
}
})