docs: Add note about shellFor and CABAL_CONFIG (#247)

This commit is contained in:
Rodney Lorrimar 2019-09-24 08:53:20 +10:00 committed by GitHub
parent 2af9b1697d
commit ad640fa02d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 deletions

View File

@ -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

View File

@ -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

View 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