Commit Graph

9 Commits

Author SHA1 Message Date
Hamish Mackenzie
a368a8f959
Fix union version range bug (#1556)
* Fix union version range bug

Needed to fix hackage updates (see https://github.com/input-output-hk/nix-tools/pull/117).

* Update materialization
2022-07-28 19:22:28 +12:00
Hamish Mackenzie
9aed9c3faf
Update materialization (#1449) 2022-04-21 21:12:51 +12:00
Hamish Mackenzie
f67cf8e439
Use updated nix-tools (#1365) 2022-02-09 22:08:43 +13:00
Hamish Mackenzie
24b421cbfc
Add ghc 9.2.1 and update internal cabal to 3.6.2 (#1286) 2021-11-13 12:43:04 +13:00
Hamish Mackenzie
674f5b0a3d
Better support for source-repository-packages, only include planned components and pick latest packages (#1166)
This change updates to the latest `nix-tools` to get the following fixes (there are 3 PRs in nix-tools, but just the one in haskell.nix to avoid having to update the materialized files multiple times):

## Better support for source repository packages

* https://github.com/input-output-hk/nix-tools/pull/107

Currently these are replaced by the `cabalProject` functions with regular `packages:` before running cabal configure.  Cabal does not treat these the same (the setting of `tests:` and `benchmarks:` in the `cabal.project` file):

* The plan found by `cabalProject` may not match the one used when running `cabal`.
* The performance of the solver may not be consistent with running `cabal`.

This change replaces `source-repository-package` with another `source-repository-package` pointing at a minimal git repo.

## Only include planned components

* https://github.com/input-output-hk/nix-tools/pull/108

Only the components in the `plan.json` are now included in the haskell.nix cabal projects.  This avoids missing dependencies attempting to build components that were not in the plan.  Should fix #993.

## Pick latest packages

* https://github.com/input-output-hk/nix-tools/pull/109

When the same package occurs more than once in a `plan.json` file (perhaps because it is needed both by the project itself and by one of the `setup` dependencies or `build-tool-dependencies` of the project) the latest version will now be the one picked by haskell.nix. This is a work around for a common issue with `cabal-doctest` when cross compiling to windows (an old version of Win32 is used even if a newer one was required by the projects `constraints`).
2021-07-23 14:27:56 +12:00
Hamish Mackenzie
f899936d1f
Update internalHackageIndexState (#1139)
The use of `sources.HTTP` to work around issues building GHC 9.0.1 causes a mismatch between `flake` based and non
 `flake` based derivations.

The fixed version of HTTP is now in hackage so updating the internal hackage index state used haskell.nix removes the need for the HTTP source override.
2021-06-16 22:10:42 +12:00
Hamish Mackenzie
0d781c04c4
Switch from cabal 3.2 to 3.4 (#1058) 2021-03-01 15:42:23 +13:00
Hamish Mackenzie
f056dd34cd
Fix the way ExeDependency is handled (#1036)
See https://github.com/input-output-hk/nix-tools/pull/101

We should look up hsPkgs.${pkg-name}.components.exe.${component-name}
instead of including the package as a dependency.

Adding `hsPkgs.${pkg-name}` a tool it is not clear which executable in the package `haskell.nix` should choose.

Haskell.nix did not deal with this well and in fact it could lead to `nix-shell` crashing.  For instance using `shellFor` to make a shell for building `haskell-language-server` with `cabal build` crashed as a dependency on `ghcide` the executable (by the `ghcide-bench` executable) caused infinite recursion.  Allowing `ghcide-bench` to correctly depend just on `components.exes.ghcide` fixes this.

This PR also includes:

* Updated materialized files built with the new nix-tools and latest index-state
* Small update to GHCJS (pins happy) to fix issue that showed up when the materialization was updated
* A fix for the infinite recursion issue when updating materialized files (by adding ghc-boot-packages-unchecked).
* Performance fix for shellFor (checks just the names of component derivations when filtering).
2021-02-12 10:45:23 +13:00
Hamish Mackenzie
cd91692380
GHC 8.10.4 (#1033)
* Adds GHC 8.10.4 support

* Drops GHC 8.8.3, 8.10.2 and 8.10.3 from CI

* Adds warning to encourage people to use less buggy ghc
2021-02-09 14:30:32 +13:00