We still do not understand the cause, but wine seems to fail to start (we get a segfault) when building `cardano-wallet-cli` test `unit`. It seems to be an overflow somewhere in bash or very early in the `wine` startup code (since nothing is logged even with `WINEDEBUG=+all`).
This changes `unsets` the large `pkgsHostTargetAsString` environment variable before wine is started (after that variable has been used). This seems to be enough to avoid the issue though it is worrying that it is not clear why.
We have been disabling terminfo in our GHC builds for cross compilers (windows and musl). This leads to an interesting problem when we `cabal configure` a project that needs `ghc`. The resulting `plan.json` might suggest that we should use the preexisting `ghc`. When it does though it does not include the `flags` needed to build it.
One fix would be to default the the `ghc` `terminfo` flag to `false` for cross compilers.
It turns out though that the reason we could not get the `terminfo` package to work with our cross compilers was that we were providing the `hostPlatform` `ncursers` when we needed the `targetPlatform` `ncursers`. Fixing that makes the cross compilers more like the native ones.
Also stops pinning wine to 5.4 on macOS (pinned version does not work there)
Currently haskell.nix uses IFDs internally in a number of places. This prevents the use of `--option allow-import-from-derivation false` even when `materialized` nix is provided.
* Changes `materialize` function so that it returns the `materialized` path when possible instead of a derivation (updates import-and-filter-project.nix to cope with that).
* Materializes the spdx json file.
* Prevents haskell.nix looking for `cabal.project`, `cabal.project.local` and `cabal.project.freeze` files in hackage packages and the ghc-extra-projects.