mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-09-19 02:47:34 +03:00
c3841b4208
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 ``` |
||
---|---|---|
.. | ||
cabal-project.nix | ||
cabal.nix | ||
compat-driver.nix | ||
component-driver.nix | ||
configuration-nix.nix | ||
error-handler.nix | ||
hackage.nix | ||
package.nix | ||
plan.nix | ||
stack-project.nix |