cabal-project: drop readFile defaults; inject platform cabalProjectLocal defaults
Two related changes to `modules/cabal-project.nix`:
**1. `cabalProjectLocal` / `cabalProjectFreeze` no longer auto-load
from disk.** The options were typed `nullOr lines` with
`readIfExists`-based defaults that did IFD lookups for
`cabal.project.local` / `cabal.project.freeze` in the project
source. Internal projects (hadrian, ghc-extra-projects) explicitly
set them to `null` just to suppress those reads, and the nullability
also prevented `mkBefore` directives from merging cleanly.
Switch the types to plain `lines` (default `""`) — projects that
relied on the implicit `readFile` behaviour now do it explicitly:
cabalProjectLocal = builtins.readFile ./cabal.project.local;
Internal callers that set `null` for IFD-avoidance lose the
explicit assignments — the new default is already IFD-free.
**2. Platform-conditional defaults are now injected into every
cabal project's `cabalProjectLocal`.** Four `mkIf` blocks added:
* **musl host** — `package * \n executable-static: True`.
comp-builder adds `--ghc-option=-optl=-static` at build time;
surfacing the toggle here makes plan-to-nix record
`--enable-executable-static`. Build artefacts are unchanged.
* **x86_64-darwin host** — `package * \n library-for-ghci: True`.
Mirrors what comp-builder passes for `!ghcjs && !wasm && !android`
(always true on darwin).
* **android host** —
`package * \n ghc-options: -optl-static -optl-ldl` (plus
`-optl-no-pie` on aarch32). Mirrors `lib/check.nix`'s
test-exe `setupBuildFlags` re-wrap.
* **wasm GHC ≥ 9.12** — `package * \n shared: True`. Wasm's RTS
linker only loads `.so` files; `--disable-shared` (cabal's
default given the real compiler's reported capabilities) would
force a `.a`-only install that TH-eval can't load.
All four sit at `mkBefore` priority so a project's own
`cabalProjectLocal` overrides them.
Cache impact: plan-nix hashes change for affected platforms.
Internal GHC builds verified byte-identical (drvPath
`na9chax1gj2n6jx3d6v86v6fdah9r9fd-ghc-9.14.1.drv` matches master).
Changelog entry added describing both changes.
Pulled out of #2504 (`hkm/builder-v2`).