Commit Graph

5 Commits

Author SHA1 Message Date
Hamish Mackenzie
a443611ecf
Add evalSystem and evalPackages project args (#1546)
This adds a way to specify the `evalSystem` or `evalPackages` explicitly when calling the `project` functions.

Currently if we want to make a `flake` that supports multiple systems we have few options:

* Require builders for all the supported systems (even just for `nix flake show`).

* Pass `--impure` so that haskell.nix can see `builtins.currentSystem` to set up `pkgs.evalPackages` to use that.  Unfortunately this prevents nix from caching some of the work it does and often results in it recalculating for each supported system when it would otherwise be cached and take no time at all.

* Add an overlay to replace `evalPackages`.  This works, but it is not straight forward.

* Materialize the nix files for the project.

This change allows `evalSystem = "x86_64-linux";` to be passed telling `haskell.nix` to run `cabal` and `nix-tools` on that system.  The user will have to have a builder for that system, but does not need to have builders for the others (unless building outputs for them).
2022-07-28 20:03:05 +12:00
Hamish Mackenzie
def2e0540e
Add just-template-haskell test for #1483 (#1504) 2022-06-03 17:26:57 +12:00
Hamish Mackenzie
95faec6038
Default reinstallableLibGhc to true (#1498)
It fixes more things than it breaks now.
2022-06-02 13:21:12 +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
4b6ee9767d
Make DLLs in deps available to wine TH runner (#1405)
This is a better fix to the problem of making DLLs available to the process running in wine that is used to evaluate TH code when cross compiling for Windows.

Also fixes macOS loadArchive in TH for ghc 9

Co-authored-by: Michael Peyton Jones <michael.peyton-jones@iohk.io>
2022-03-25 21:44:02 +13:00