matrix: use flutterBuildFlags (string) not targetFlags for --base-href (#634 followup)
This commit is contained in:
parent
20b5e03ee0
commit
e3f098df64
1 changed files with 10 additions and 9 deletions
|
|
@ -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/"`
|
||||
|
|
|
|||
Loading…
Reference in a new issue