Compare commits

..

No commits in common. "de03fac69fe66a33979dd4fa49742c6f6b21eb58" and "4fc026d14d813dda91bd619140f8c080f909a075" have entirely different histories.

View file

@ -19,7 +19,7 @@
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
}; };
mkWebapp = { pkgs, brandDir ? ./branding/default, app ? "main", extraEnv ? {} }: mkWebapp = { pkgs, brandDir ? ./branding/default, app ? "main" }:
let let
buildScript = if app == "main" then "build" else "build:${app}"; buildScript = if app == "main" then "build" else "build:${app}";
outDir = if app == "main" then "dist" else "dist-${app}"; outDir = if app == "main" then "dist" else "dist-${app}";
@ -59,19 +59,13 @@
# pwa-assets.config.ts. brandDir is either ./branding/default # pwa-assets.config.ts. brandDir is either ./branding/default
# (a path inside this flake's source) or an external path that # (a path inside this flake's source) or an external path that
# nix has copied into the build sandbox. # nix has copied into the build sandbox.
#
# `extraEnv` flows in VITE_* and any other build-time env vars
# the caller wants to bake into the bundle (e.g. webapp-module
# passes VITE_NOSTR_RELAYS / VITE_LNBITS_BASE_URL / …; the
# server-deploy standalones module passes VITE_BASE_PATH +
# VITE_APP_NAME for per-app path mounts).
env = { env = {
BRAND_DIR = "${brandDir}"; BRAND_DIR = "${brandDir}";
BRAND_APP = if app == "main" then "" else app; BRAND_APP = if app == "main" then "" else app;
# Avoid pnpm 10's interactive modules-purge prompt in the # Avoid pnpm 10's interactive modules-purge prompt in the
# sandbox (ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY). # sandbox (ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY).
CI = "true"; CI = "true";
} // extraEnv; };
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild