on iko/ghcjs-patch-master help sign in
docs: Add note about shellFor and CABAL_CONFIG (#247)
ad640faRodney Lorrimar
docs/reference/library.md+9−1
@@ -281,7 +281,7 @@ These functions exist within the `hsPkgs` package set.
281
281
282Create a `nix-shell` [development
282Create a `nix-shell` [development
283environment](../user-guide/development.md) for developing one or more
283environment](../user-guide/development.md) for developing one or more
284−packages.
284+packages with `ghci` or `cabal v2-build` (but not Stack).
285
285
286```
286```
287shellFor =
287shellFor =
@@ -297,6 +297,14 @@ shellFor =
297
297
298**Return value**: a derivation
298**Return value**: a derivation
299
299
300+!!! warning
301+
302+ `shellFor` will set the `CABAL_CONFIG` environment variable to disable
303+ remote package servers. This is a [known
304+ limitation](../dev/removing-with-package-wrapper.md) which we would
305+ like to solve.
306+
307+
300## ghcWithPackages
308## ghcWithPackages
301
309
302Creates a `nix-shell` [development
310Creates a `nix-shell` [development
docs/user-guide/development.md+5−1
@@ -45,7 +45,7 @@ If you have a Cabal or Stack project with multiple packages
45(i.e. multiple `.cabal` files, not a single package with multiple
45(i.e. multiple `.cabal` files, not a single package with multiple
46components), then you will need a development environment that
46components), then you will need a development environment that
47contains the _dependencies_ of your packages, but not the packages
47contains the _dependencies_ of your packages, but not the packages
48−themselves. This is what the `shellFor` function does.
48+themselves. This is what the [`shellFor`][shellFor] function does.
49
49
50```nix
50```nix
51# shell.nix
51# shell.nix
@@ -71,6 +71,10 @@ in
71 }
71 }
72```
72```
73
73
74+See also: [Haskell.nix Library Reference: `shellFor`][shellFor]
75+
76+[shellFor]: ../reference/library.md#shellfor
77+
74## How to get a local Hoogle index
78## How to get a local Hoogle index
75
79
76If you need a local Hoogle for all the dependencies of your project create this file
80If you need a local Hoogle for all the dependencies of your project create this file
mkdocs.yml+1−1
@@ -33,7 +33,7 @@ pages:
33 - 'How to cross-compile your project': user-guide/cross-compilation.md
33 - 'How to cross-compile your project': user-guide/cross-compilation.md
34 - 'Reference':
34 - 'Reference':
35 - 'Command-line tools': reference/commands.md
35 - 'Command-line tools': reference/commands.md
36− - 'Haskell.nix Libary': reference/library.md
36+ - 'Haskell.nix Library': reference/library.md
37 - 'Module options': reference/modules.md
37 - 'Module options': reference/modules.md
38 - 'Templates / Abstraction':
38 - 'Templates / Abstraction':
39 - 'IOHKs nix library': iohk-nix.md
39 - 'IOHKs nix library': iohk-nix.md