Commit Graph

61 Commits

Author SHA1 Message Date
Hamish Mackenzie
c2f14344f1
Add ghc 9.2.4 (#1566) 2022-07-31 21:41:50 +12:00
Hamish Mackenzie
3025de7f1a
Fix nix-tools for ghc 8.6.4 and 8.6.3 (#1562) 2022-07-29 17:05:23 +12:00
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
4e01f34543
Add nixpkgs-2205 and update other nixpkgs pins (#1506) 2022-07-17 18:18:19 +12:00
Hamish Mackenzie
2739817902
Fixes for materialization (#1514) 2022-06-15 00:27:05 +12:00
Hamish Mackenzie
2812ae6745
Use targetPackages.ncurses for ghc cross compiler (#1513)
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)
2022-06-11 08:37:16 +12:00
Hamish Mackenzie
91036142ef
Better support for allow-import-from-derivation=false (#1474)
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.
2022-06-02 20:11:27 +12:00
Hamish Mackenzie
fa2fa131fe
Add ghc 9.2.3 (#1491)
Also:

* Updates the GHC's built on CI
* Use Cabal 3.6.2.0 for default Setup
* Fixes haskell-language-server and hlint on CI
2022-06-01 19:33:58 +12:00
Hamish Mackenzie
07619e1979
Remove build-tool-depends for happy and Alex from ghc (#1485)
These don't seem to be needed and adding them causes #1480.
2022-05-30 23:33:35 +12:00
Hamish Mackenzie
82bc945818
Fix ghc 9 windows cross compilation (#1450)
Fixes Windows cross compilation for GHC 9.0 and 9.2.

Updates wine to use the version that is included with the chosen Nixpkgs (it used to be pinned to an older version).

Moves the configuration of the GHC source into the GHC derivation.  This should make adding Hadrian support easier.

Propagates library dependences (not just pkgconfig ones) on windows so that any DLLs in those libraries can be copied for TH evaluation and to the `/bin` directory of executable components.

Adds gcc and mfcgthreads as library dependencies on Windows so that the DLLs they include will be found.

Use `$pkgsHostTarget` (instead of `ghc-pkg`) to find all the DLLs can copy them to the `/bin` directory of executable components.

Adds support for __int128_t and __uint128_t to language-c to fix aarch64-darwin builds.

Fixed reinstalling packages that come with patched versions in ghcjs.
2022-05-19 20:21:16 +12:00
Hamish Mackenzie
9aed9c3faf
Update materialization (#1449) 2022-04-21 21:12:51 +12:00
Hamish Mackenzie
ecc62190e6
Add missing ghc 9.2.2 x86_64-darwin materialization (#1438) 2022-04-13 21:30:42 +12:00
Hamish Mackenzie
fa2d8a9b6f
Add ghc 9.2.2 (#1394) 2022-03-08 14:34:04 +13:00
Hamish Mackenzie
7e06e14ae1
Use ghc 8.8.3 to boot native aarch64-linux compiler (#1390)
For some reason there is no binary for 8.8.4 see:

https://downloads.haskell.org/ghc/8.8.3/
https://downloads.haskell.org/ghc/8.8.4/
2022-03-03 16:33:04 +13:00
Hamish Mackenzie
90a0cf6488
Add bootstrap materialization for ghc 8.8.4 (#1374) 2022-02-15 15:44:53 +13:00
Hamish Mackenzie
f67cf8e439
Use updated nix-tools (#1365) 2022-02-09 22:08:43 +13:00
Hamish Mackenzie
6101c6ea7b
Add GHC 9.0.2 (#1338)
Co-authored-by: Ollie Charles <ollie@ocharles.org.uk>
2022-01-09 03:10:05 +13:00
Peter Becich
5f2f567c0d
use Cabal 3.6.2.0 (#1328)
* use Cabal 3.6.2.0

* ghcjs 8.10.7 materialization update

* another ghcjs 8.10.7 materialization update
2022-01-04 17:53:33 +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
f8d4795cfe
Update ghcjsVersion to match cabal file (#1266)
* Update ghcjsVersion to match cabal file

* Update materialized files

* Update materialized files
2021-10-12 13:28:42 +13:00
Hamish Mackenzie
f3b109b2fb
Add aarch64-darwin support (#1230) 2021-09-07 22:22:01 +12:00
Hamish Mackenzie
e7808afc97
Fix materialization for ghc901 (#1228) 2021-09-03 16:20:26 +12:00
Hamish Mackenzie
1f4c2c9b08
Add GHC 8.10.7 (#1220) 2021-09-01 22:43:31 +12:00
Hamish Mackenzie
58dff9550b
Update some older GHC materialization files (#1222) 2021-09-01 20:21:30 +12:00
Teo Camarasu
f624ca5662
Add GHC-8.10.6 (#1214)
Add GHC-8.10.6

Co-authored-by: Peter Becich <peter@simspace.com>
Co-authored-by: Teo Camarasu <teofilcamarasu@gmail.com>
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2021-08-31 04:19:40 +12:00
Hamish Mackenzie
e4e860cf11
Fix AArch64 materialized nix files for bootstrap (#1210)
See #1207
2021-08-24 18:36:02 +12:00
Hamish Mackenzie
9e5d672d13
Update materialization for ghc810420210212 (#1175) 2021-07-26 15:05:24 +12: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
a5b74bf002
niv update nixpkgs-unstable and add ghc 8.10.5 (#1121) 2021-06-15 19:50:45 +12:00
Hamish Mackenzie
9ce7bf1e02
GHCJS 8.10 (#1082) 2021-03-29 22:36:47 +13:00
Hamish Mackenzie
a59be5c421
Add GHC 9.0.1 (#1032)
Also refactors the way tests are filtered to use `meta.disabled` where possible.
2021-03-28 21:03:20 +13:00
Hamish Mackenzie
4d700cf155
Fixing emcc usage in haskell.nix ghcjs (#1064)
* Use emscripten branch of GHCJS for 8.6

* Adds release-linux-only.nix (for hydra with no mac builders)

* Sets HOME to a temp dir once per derivation to help performance of emcc

* Updates materialization

* Uses symlinks to reduce ghc derivation size for wrapped ghcjs

* Removes compiler-nix-name test
    This test checked that the default compiler was overridden by the
    compiler-nix-name arg.  There is no default any more.

The GHCJS branches used include fixes for:

* hs$ret_1 typo (should be hs$ret1)

* A bignum issue
2021-03-12 12:21:07 +13:00
Hamish Mackenzie
0d781c04c4
Switch from cabal 3.2 to 3.4 (#1058) 2021-03-01 15:42:23 +13:00
Hamish Mackenzie
413adb037f
Update core interface files GHC to 8.10.4 (#1039) 2021-02-16 23:15:55 +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
Hamish Mackenzie
b20a2dd1a3
Add missing materialization for 8.10 windows cross (#1002) 2021-01-18 19:16:35 +13:00
Hamish Mackenzie
0f7c5afc41
Add ghc 8.10.3 (#980) 2021-01-11 18:47:56 +13:00
Michael Peyton Jones
738af22ce9
Move more CI to 20.09 (attempt 2) (#975)
* Update default nixpkgs to 20.09

* Move more CI to work on 20.09 by default

* IFD level 1

* Use nixpkgs 20.03 emscripten (needed for ghcjs)

* Add missing materialized files

* Add missing materialized files

* Fix for ghc 8.8 build on darwin

* Fix for ghcjs 8.8 build on darwin

* Fix hls stack test eval for ghc810220201118

* ifdLevel 2

* Oops: accidentally turned on tests for experimental GHC

* Revert "Fix hls stack test eval for ghc810220201118"

This reverts commit b405cd7ee8bd62214bd2d0a61e0317673b5bf1b5.

* ifdLevel 3

* Disable GHC 8.6.5 windows cross on nixpkgs 20.09

* Update supported GHC doc with a table

* Add emscripten comment

Co-authored-by: Hamish Mackenzie <Hamish.Mackenzie@iohk.io>
2020-12-17 15:57:09 +00:00
Hamish Mackenzie
b611105898
Update version number of ghc8102-experimental (#927)
Sets the version number to `8.10.2.20201118` and compiler nix name to `ghc810220201118`
2020-12-07 17:19:39 +13:00
Hamish Mackenzie
7078b145e9
Add support for ghcjs 8.8 and making ghcjs bundles (#828)
Fixes ghcjs 8.6.5 and 8.8.4.

Uses emscripten for ghcjs 8.8 and adds scripts for building ghcjs 8.8.

Many fixes for ghcjs test failures.

Includes relocatableConfigFiles for making relocatable ghcjs bundles.
2020-11-17 22:22:53 +13:00
Hamish Mackenzie
2f48630357
Fix dumby GHC 8.10 Booter Version (#896)
We switched the booter ghc version from 8.8.4 to 8.6.5, but did not
update the dummy ghc info.  This causes problems when checking
materialization.
2020-10-27 17:17:36 +13:00
Hamish Mackenzie
cda15dc5b7
Add ghc8102-plutus as a compiler-nix-name (#848)
This change introduces a `ghc8102-experimental` compiler-nix-name that behaves much like the `ghc8102` version but includes @JoshMeredith's patch `./patches/ghc/ghc-8.10-ubxt.patch` that writes the `cg_binds` field with:

```haskell
  liftIO $ registerInterfaceDataWith "ghc/phase/core" hsc_env $ \bh ->
    putWithUserData (const $ return ()) bh (map toIfaceBind $ cg_binds cg_guts)
```

Some of the places where we used to depend on the output of `plan-to-nix` containing the correct `nix-name` for the compiler have been update to avoid using incompatible interface files from the `compiler-nix-name = "ghc8102"` version of GHC.
2020-10-21 17:04:47 +13:00
Hamish Mackenzie
316351ab3e
Add materialized files for ghc 8.8.4 (#869) 2020-10-08 17:04:02 +13:00
Hamish Mackenzie
6134e66e1d
Fix ghc 8.10 windows cross (boot with 8.6.5) (#865)
It looks like we can't use 8.8 for booting due to
https://gitlab.haskell.org/ghc/ghc/-/issues/18143

* Adds nixpkgs 20.09 to get mingw-w64 version 6
  (also needed for ghc 8.10 windows cross compile)

* Add materialization for ghc 8.10.2 windows cross

* Fix issue with harfbuzz override so it works with nixpkgs 20.09

* Fixes eval time issue for windows index-state test (turns off native-dns cabal flag for windows)

* Include exe extension for windows in coverage test

lib:ghc is still broken for ghc 8.10 (all variants), but it always has been and we should try to fix it properly, but it will be very tricky.
2020-10-07 15:42:32 +13:00
Hamish Mackenzie
c7c7d6c43a
Add ghc 8.10.2 (#807) 2020-08-11 14:26:50 +12:00
Hamish Mackenzie
cacfba0b45
Replace ghc 8.8.3 with 8.8.4 (#766)
Also adds some tooling/docs for adding new ghc versions (see `docs/adding-new-ghc.md`)
2020-07-21 14:10:23 +12:00
Hamish Mackenzie
4cac8bd00f
Remove internal deps on default ghc and stackage (#738)
Changes to the interface of haskell.nix (from the changelog.md file):

* Removed `sources.nixpkgs-default`, use `sources.nixpkgs` instead.
* Removed `./nixpkgs` directory, use  `(import ./. {}).sources`
  or `./nix/sources.nix` instead.
* Removes V1 interface for details on how to fix old code see:
    https://github.com/input-output-hk/haskell.nix/issues/709
* Removed defaultCompilerNixName.
* cabalProject, cabalProject', hackage-project and hackage-package
  now require a `compiler-nix-name` argument.
* `haskell-nix.tool` and `.tools` now require a `compiler-nix-name` argument.
  New functions `p.tool` and `p.tools` (where p is a project) do not.
  Like `shellFor { tools = ... }` they will use the compiler nix name
  from the project (including stack projects where it is derived from
  the resolver).
* `haskell-nix.alex` and `haskell-nix.happy` have been removed. Use
  `p.tool "alex" "3.2.5"` or `shellFor { tools = { alex = "3.2.5"; } }`.
* `haskell-nix.nix-tools` -> `haskell-nix.nix-tools.ghc883` (it includes
  the hpack exe now).
* `haskell-nix.cabal-install` -> 
  `p.tool "cabal" "3.2.0.0"` or `shellFor { tools = { cabal = "3.2.0.0"; } }`
* `haskell-nix.haskellNixRoots` -> `haskell-nix.roots ghc883` or `p.roots`

Other changes:

Adds hpack executable to the nix-tools derivations.

Adds a `cabal-hpack` test to make sure `hpack` works with
`cabalProject`.

Reduces the number of calls to `cabalProject` (particularly when
checking materialization), by giving internal tools a per-compiler
attribute.

Uses happy 1.19.12 when building newer ghc versions.

Updates cabal-install 3.2.0.0 to use the source from github that
is compatible with ghc 8.10.1.

Updates the docs for callCabalProjectToNix.

Adds a license mapping to fix a common warning.
2020-07-08 22:54:01 +12:00
Moritz Angermann
285b4ae6ef
bump (#723) 2020-06-23 12:57:01 +08:00