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`,
# `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/"`