"Recent" cabal changes broke nofib.
Cabal changed where it places the package database when using cabal install --lib breaking all tests which rely on packages which are not boot libraries.
Cabal seems to add some sort of hash now to the relevant path. So it seems tricky to reliably identify where the package db sits now.
I think our options are:
- Simply look for the package db in the store folder. Be that by shelling out to
findor by some other means. - Properly deal with environment files. See
https://cabal.readthedocs.io/en/stable/cabal-commands.html#adding-libraries-to-ghc-package-environments
While two sounds more proper, in practice I don't think there is any guarantee that the path the actual env file is placed won't change the same way the location of the package db has changed. So perhaps it's best to just go with option one without any further refactorings.
To illustrate point #2 (closed). A command like cabal install --lib unboxed-ref --package-env ./myenv will place a env file in myenv/.ghc.environment.x86_64-mingw32-9.10.1 today. I'm not sure why that path couldn't change, or why there couldn't be changes to how that file needs to be parsed in the future.