added mealie
This commit is contained in:
parent
88ce2e6a5f
commit
8d47f6b09c
11 changed files with 295 additions and 8 deletions
46
mealie/mealie-frontend.nix
Normal file
46
mealie/mealie-frontend.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
src: version:
|
||||
{ lib, fetchYarnDeps, nodejs_18, prefetch-yarn-deps, stdenv, ... }: stdenv.mkDerivation {
|
||||
name = "mealie-frontend";
|
||||
inherit version;
|
||||
src = "${src}/frontend";
|
||||
|
||||
yarnOfflineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/frontend/yarn.lock";
|
||||
hash = "sha256-zQUD/PQWzp2Q6fiVmLicvSusXffu6s9q3x/aAUnCN38=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
prefetch-yarn-deps
|
||||
nodejs_18
|
||||
nodejs_18.pkgs.yarn
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
export HOME=$(mktemp -d)
|
||||
yarn config --offline set yarn-offline-mirror "$yarnOfflineCache"
|
||||
fixup-yarn-lock yarn.lock
|
||||
command -v yarn
|
||||
yarn install --frozen-lockfile --offline --no-progress --non-interactive
|
||||
patchShebangs node_modules/
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export NUXT_TELEMETRY_DISABLED=1
|
||||
yarn --offline build
|
||||
yarn --offline generate
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mv dist $out
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue