mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-09-11 06:55:40 +03:00
docs: Add note about shellFor and CABAL_CONFIG (#247)
This commit is contained in:
parent
2af9b1697d
commit
ad640fa02d
@ -281,7 +281,7 @@ These functions exist within the `hsPkgs` package set.
|
||||
|
||||
Create a `nix-shell` [development
|
||||
environment](../user-guide/development.md) for developing one or more
|
||||
packages.
|
||||
packages with `ghci` or `cabal v2-build` (but not Stack).
|
||||
|
||||
```
|
||||
shellFor =
|
||||
@ -297,6 +297,14 @@ shellFor =
|
||||
|
||||
**Return value**: a derivation
|
||||
|
||||
!!! warning
|
||||
|
||||
`shellFor` will set the `CABAL_CONFIG` environment variable to disable
|
||||
remote package servers. This is a [known
|
||||
limitation](../dev/removing-with-package-wrapper.md) which we would
|
||||
like to solve.
|
||||
|
||||
|
||||
## ghcWithPackages
|
||||
|
||||
Creates a `nix-shell` [development
|
||||
|
@ -45,7 +45,7 @@ If you have a Cabal or Stack project with multiple packages
|
||||
(i.e. multiple `.cabal` files, not a single package with multiple
|
||||
components), then you will need a development environment that
|
||||
contains the _dependencies_ of your packages, but not the packages
|
||||
themselves. This is what the `shellFor` function does.
|
||||
themselves. This is what the [`shellFor`][shellFor] function does.
|
||||
|
||||
```nix
|
||||
# shell.nix
|
||||
@ -71,6 +71,10 @@ in
|
||||
}
|
||||
```
|
||||
|
||||
See also: [Haskell.nix Library Reference: `shellFor`][shellFor]
|
||||
|
||||
[shellFor]: ../reference/library.md#shellfor
|
||||
|
||||
## How to get a local Hoogle index
|
||||
|
||||
If you need a local Hoogle for all the dependencies of your project create this file
|
||||
|
@ -33,7 +33,7 @@ pages:
|
||||
- 'How to cross-compile your project': user-guide/cross-compilation.md
|
||||
- 'Reference':
|
||||
- 'Command-line tools': reference/commands.md
|
||||
- 'Haskell.nix Libary': reference/library.md
|
||||
- 'Haskell.nix Library': reference/library.md
|
||||
- 'Module options': reference/modules.md
|
||||
- 'Templates / Abstraction':
|
||||
- 'IOHKs nix library': iohk-nix.md
|
||||
|
Loading…
Reference in New Issue
Block a user