haskell.nix/modules
Hamish Mackenzie c3841b4208
Add cross compilation and devShell to project.flake (#1141)
The default shell `devShell` works by adding a default `shell` to all projects.  You can pass the shell arguments to the project function using the new `shell` argument:

```
let myProject = haskell-nix.project {
  src = ./.;
  shell.tools = { cabal = {}; };
  shell.crossPlatforms = p: [ p.cross ];
};
```

This will include js-unknown-ghcjs-cabal in the `devShell`.

To add cross compiled outputs to the flake pass `crossPlatforms` to the `flake` function.

```
myProject.flake { crossPlatforms = p: [ p.cross ]; }
```

To cross compile a component include the platforms `config` string to the output name like this

```
nix build .#js-unknown-ghcjs:pkg-name:lib:pkg-name
```
2021-06-17 19:07:37 +12:00
..
cabal-project.nix Add cross compilation and devShell to project.flake (#1141) 2021-06-17 19:07:37 +12:00
cabal.nix Spelling, typo and whitespace fixes (#833) 2020-08-31 11:08:25 +12:00
compat-driver.nix Use NixOS module system 2018-11-01 13:33:41 +08:00
component-driver.nix Add GHC 9.0.1 (#1032) 2021-03-28 21:03:20 +13:00
configuration-nix.nix Use configuration-nix to include freetds dependency of the odbc package (#1000) 2021-01-16 13:16:00 +13:00
error-handler.nix Fix the way ExeDependency is handled (#1036) 2021-02-12 10:45:23 +13:00
hackage.nix Spelling, typo and whitespace fixes (#833) 2020-08-31 11:08:25 +12:00
package.nix support cabal-doctest (#427) 2021-03-20 14:25:30 +13:00
plan.nix support cabal-doctest (#427) 2021-03-20 14:25:30 +13:00
stack-project.nix Add cross compilation and devShell to project.flake (#1141) 2021-06-17 19:07:37 +12:00