matrix: use flutterBuildFlags (string) not targetFlags for --base-href (#634 followup)

This commit is contained in:
damocles 2026-05-30 16:36:51 +02:00 committed by Mara
commit e3f098df64

View file

@ -191,16 +191,17 @@ in
# the browser resolves relative asset paths (`Imaging.js`, # the browser resolves relative asset paths (`Imaging.js`,
# `flutter.js`, `splash/*`) against the document ROOT, # `flutter.js`, `splash/*`) against the document ROOT,
# producing 404s for every asset (#634). Inject the right # producing 404s for every asset (#634). Inject the right
# base-href into the build via nixpkgs's `buildFlutterApplication` # base-href into the actual `flutter build web` invocation
# targetFlags. When subdomain routing lands (#609 — # via the upstream derivation's `flutterBuildFlags` string
# `matrix.${hyperhiveDomain}`), drop this override; upstream's # (the buildPhase is literally
# `/` base-href is correct at the root of a dedicated subdomain. # `flutter build web -v $flutterBuildFlags`). When subdomain
targetFlags = (old.targetFlags or [ ]) ++ [ # routing lands (#609 — `matrix.${hyperhiveDomain}`), drop
"--base-href" # this override; upstream's `/` base-href is correct at the
"/matrix/" # 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 = '' description = ''
Static web client dist to serve at `/matrix/`. Defaults to Static web client dist to serve at `/matrix/`. Defaults to
`pkgs.fluffychat-web` rebuilt with `--base-href "/matrix/"` `pkgs.fluffychat-web` rebuilt with `--base-href "/matrix/"`