76 Commits

Author SHA1 Message Date
Moritz Angermann c1f09d8ce4 include lib:ghc in cross compiler installations (#1858)
* include lib:ghc in cross compiler installations

* Updated materialization

* More materialization

* More materialization

---------

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2023-02-26 13:05:22 +13:00
Hamish Mackenzie 9a0629494e Add ghc 9.4.4 materialisation and trace hydra job names (#1849)
* Trace the attribute names of hydra jobs

* Materialize hadrian plan-nix

* Only break out linux ghc 8.10.7 tests to cut down on the number of hydra jobs.

* Materialize iserv-proxy plan-nix
2023-02-19 20:43:52 +13:00
Andrea Bedini 9c1c2218ef Fix writing the freeze file to plan-nix.freeze (#1845)
* Fix writing the freeze file to plan-nix.freeze

* Update nix-tools materialization

---------

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2023-02-17 14:10:36 +08:00
Teo Camarasu 4952abb034 Add GHC-9.2.6 (#1842)
* Add GHC-9.2.6

* More ghc 9.2.6 changes

* ifdLevel 0

* ifdLevel 1

* More aarch64 materialization

* Add spdx 3.19 materialization

* ifdLevel 2

* Remaining materialization files

* ifdLevel 3

* More materialization

---------

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2023-02-15 12:24:04 +13:00
Hamish Mackenzie 3bda28057b Fix ghc 9.4.4 materialization (#1843)
* Fix ghc 9.4.4 materialization

* Remaining materialization files
2023-02-13 10:46:12 +13:00
Andrea Bedini 7075077d46 Support revisions and more (#1775)
* Support revisions

Cabal files are now obtained from the index tarball (as cabal does)
directly. This allows us to always pick the cabal file revision that
cabal would pick, without having to understand or reference hackage.

* Update nix-tools materialised plan for new tooling

* Update materialized files

* Eval on x86_64-linux

* Turn off full materialization check

* Replace pkgs.writeText with passAsFile

Nix derivations are already able to pass a attribute to the builder as a
file. This means we don't need to use pkgs.writeText to turn the
cabalFile attribute into a file, saving one derivation.

* Bump closure size limit to 540

---------

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2023-02-09 12:55:40 +13:00
Peter Becich e83ef3d9da support GHC 9.4.4 (#1822)
* GHC 9.4.4

* Add materialized dummy-ghc/ghc-9.4.4-x86_64-linux

* More ghc 9.4.4 changes

* Add materialized files

* Fix typo

Co-authored-by: Teo Camarasu <teofilcamarasu@gmail.com>
Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2023-01-25 09:58:19 +13:00
Hamish Mackenzie 7573eb34f6 Fix ghc 9.4.3 TH support (#1814) 2023-01-24 11:12:44 +13:00
Hamish Mackenzie 6c992eacf6 Use hadrian to build ghc 9.4 (#1475)
Adds GHC 9.4 and uses hadrian to build it.

This also updates the way iserv-proxy and remote-iserv are built as they now have their own package and gitlab repo.

Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
2022-12-08 15:01:05 +13:00
Hamish Mackenzie 8139a26de3 Include cache.zw3rk.com for github actions (#1805)
* Include cache.zw3rk.com for github actions

* Avoid building all compilers when checking boot materialization

* More materialization fixes

* More materialization fixes
2022-12-07 11:04:48 +13:00
Hamish Mackenzie 8809b04a75 Patch nix-tools materialized files for ghc 8.8.2 2022-11-21 13:24:32 +13:00
Hamish Mackenzie cbf1e918b6 Add ghc 9.2.5 (#1779)
* Add ghc 9.2.5

* More materialization updates

* More materialization updates

* More materialization updates

* Remaining materialization changes

* Fix ghcjs cabal materialization issue
2022-11-15 17:12:14 +13:00
Hamish Mackenzie 64e8460c35 Bump nixpkgs pins (#1710)
* Fix ghcjs for time_t is 64bit in emscripten now.
* Fix error: qca2 has been removed, because it depended on qt4.
* Add spdx 3.18 materialization.
* Turn off building tests for wine-5.4 (due to IDL issue).
* Fix options-doc.nix.
* Comment added to force rebuild on hydra
2022-09-27 13:00:15 +13:00
Yvan Sraka 5990fee152 Fix #1674: use Nix flakes rather than Niv to pin nix-tools dependencies (#1694)
* Fix #1674: use Nix flakes rather than Niv to pin `nix-tools` dependencies

* Update nix-tools flake

* Update nix-tools flake.lock

* Update nix-tools flake.nix

* Update nix-tools flake.lock

* Update materialization

* Update materialization

* Update nix-tools flake.lock

Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>
2022-09-24 18:39:55 +12:00
Hamish Mackenzie 6c7f9d0042 Use cabal 3.8 (#1641)
A bug was fixed in cabal 3.8 (https://github.com/haskell/cabal/issues/6771) that haskell.nix relied on for `pkg-config` in support.  To work around this we added a dummy `pkg-config` that `cabal configure` now uses when haskell.nix runs it `cabal configure` internally.  That returns version information for all the `pkg-config` packages in `lib/pkgconfig-nixpkgs-map.nix`.  This mapping has also been expanded based on the results of searching nixpkgs for `*.pc` files.

This update also includes workarounds for:

https://github.com/haskell/cabal/issues/8352
https://github.com/haskell/cabal/issues/8370
https://github.com/haskell/cabal/issues/8455
2022-09-13 12:00:04 +12:00
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