From e3f098df6401f170edcc3b144083f9f681eca8b8 Mon Sep 17 00:00:00 2001 From: damocles Date: Sat, 30 May 2026 16:36:51 +0200 Subject: [PATCH] matrix: use flutterBuildFlags (string) not targetFlags for --base-href (#634 followup) --- nix/modules/hive-matrix.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/nix/modules/hive-matrix.nix b/nix/modules/hive-matrix.nix index 3c17d271..85716052 100644 --- a/nix/modules/hive-matrix.nix +++ b/nix/modules/hive-matrix.nix @@ -191,16 +191,17 @@ in # the browser resolves relative asset paths (`Imaging.js`, # `flutter.js`, `splash/*`) against the document ROOT, # producing 404s for every asset (#634). Inject the right - # base-href into the build via nixpkgs's `buildFlutterApplication` - # targetFlags. When subdomain routing lands (#609 — - # `matrix.${hyperhiveDomain}`), drop this override; upstream's - # `/` base-href is correct at the root of a dedicated subdomain. - targetFlags = (old.targetFlags or [ ]) ++ [ - "--base-href" - "/matrix/" - ]; + # base-href into the actual `flutter build web` invocation + # via the upstream derivation's `flutterBuildFlags` string + # (the buildPhase is literally + # `flutter build web -v $flutterBuildFlags`). When subdomain + # routing lands (#609 — `matrix.${hyperhiveDomain}`), drop + # this override; upstream's `/` base-href is correct at the + # root of a dedicated subdomain. + flutterBuildFlags = + (old.flutterBuildFlags or "") + " --base-href /matrix/"; }); - defaultText = lib.literalMD "`pkgs.fluffychat-web` rebuilt with `--base-href /matrix/` via `targetFlags`."; + defaultText = lib.literalMD "`pkgs.fluffychat-web` rebuilt with `--base-href /matrix/` via `flutterBuildFlags`."; description = '' Static web client dist to serve at `/matrix/`. Defaults to `pkgs.fluffychat-web` rebuilt with `--base-href "/matrix/"`