Some packages cabal-install needed a certain version range (cabal-install-solver
and resolv) have versions incompatible with these in Stackage LTS 21. We can,
however, easily provide the necessary ones.
Additionally, we clean up some old resolv related overrides that are no longer
necessary or we no longer care about (being able to build cabal-install with
GHC 8.6, namely).
GHC 9.4 introduced a virtual package for linking against the C++
standard library. Since some packages depend on it when configured with
GHC 9.4 (as hackage2nix does), we need to make sure the attribute exists
or some packages will fail to evaluate. The may still build, even though
there is no shim for lower GHC versions (as far as I know).
Before Cabal >= 3.8, Cabal-syntax did not exist, but there is a dummy
package Cabal-syntax-3.6.0.0 which can be used to prevent the constraint
solver from picking mutually incompatible versions of Cabal and
Cabal-syntax. Since we are now solving flags with Cabal >= 3.8, many
packages have a dependency on Cabal-syntax they did not have before,
requiring us to have a matching attribute in every package set. Using
the dummy package is the safest solution, although it is not required in
every case.
Fixes eval of jailbreak-cabal for GHC < 9.4.
- The dontCheck overrides are not necessary completely. It seems that
there is some kind of issue with the doctest suite, but we can run the
other ones.
- We need a jailbreak everywhere due to doctest (ironically), so we can
move that into the common configuration.
- The i686 issue has been closed upstream. Tested locally to confirm
that it is indeed not a problem anymore.
terminfo had a new release on hackage and we only ship the latest
version currently, so every GHC gets the newest version. Whether this is
correct, is another question, occurs to me – we'll have to look into
whether we should fix this at some point.
Since the overrides are practically the same for all but the latest GHC
version, we can move the override into configuration-common.nix and rely
on a few conditionals in the overlay assembly — and end up with less
copying around!
I accidentally committed a test changing `self` to `super` which makes the
build fail. We definitely want `self` here, see
https://github.com/NixOS/nixpkgs/pull/205902 for why.
This is a dependency of cabal-install and builds by virtue of its
overrideScope. We also want to make sure it builds independently, so
that it doesn't get marked as broken at the very least.
GHC's cross build flavours disable the terminfo package, so it will
never be included if we are cross-compiling – setting it to null thus
breaks all builds depending on the package.
To fix this problem, we use the versioned attribute generated by
hackage2nix, just like we do for xhtml.
Closes#182785.
The xhtml library is only built as part of the GHC build process if GHC
is disabled. This means that no GHC cross compiler has xhtml bundled,
since haddock can't be built if GHC is a cross compiler (see relevant
notes in the GHC nix expressions). This means that all packages
depending on xhtml would currently fail to build when cross-compiled, as
haskellPackages would assume it'd be provided by GHC. This is fixed by
this commit.
pkgsStatic hits this case, so we test compilation of xhtml for these
package sets which will remind us to update the attribute name whenever
its version changes.
Patch sent to upstream via email, but the package hasn't been updated in
ten years.
Changes:
- IO.seek should now return the new offset so I used modifyMVar instead
of modifyMVar_
- mkFileHandle now requires a RawIO instance for Device. Since this was
not the case before and I don't think we need to actually support raw
IO, I used DeriveAnyClass.
Thanks to Ryan Scott's investigation it became clear this crash can also
happen on Linux and thus seems to be a general issue in GHC 9.0.2 (only,
luckily). We'll disable the test suite everywhere for now, but the
prospect of this crash / incorrect runtime result is a bit ominous.
Refer to the [ghc-issue] for details.
[ghc-issue]: https://gitlab.haskell.org/ghc/ghc/-/issues/21141
I've tried to be conservative and only clean up things that broke eval
which in most cases had to do with uses of versioned packages that have
become the default in Stackage Nightly now. There's probably still
potential for cleaning up some additional workarounds and likely there
are still a lot of new workarounds to be found once we know about the
build failures.
Also note that clean eval only means that nix-env doesn't fail.
Notes:
* HLS now lacks the stylish-haskell and britanny plugins by default,
since they don't support GHC 9.0.2. We'll need to re-enable them
for GHC < 9.0.2
* A lot of uses of hspec 2.9.* can probably be removed, as 2.8.* which
is used in Stackage Nightly is new enough for most packages.
0.14.0.0 introduces support for GHC 9.0.1, but also drops support for
all GHCs below, so we can't upgrade to that version.
For the 9.0.1 hls brittany support is now possible in theory. In
practice however, it is a massive pain to get to work, as britanny
depends on the latest and greatest version of multiple packages that are
pinned by Stackage LTS.