You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it is recommended to go over the steps detailed in this section again, or look for alternative ways to add extra substituters in [nix.conf](https://nix.dev/manual/nix/2.18/command-ref/conf-file).
31
33
32
-
## Switching between different GHC versions
34
+
## Enabling the development environment
33
35
34
-
The `bin` directory, holds all available shells:
36
+
To enable the development environment exposed by the project's [Nix flake](../flake.nix), you can start a development shell by running the following command from within the project's root:
35
37
36
38
```
37
-
ls bin | grep ghc
39
+
nix develop
38
40
```
39
41
40
-
To spawn a new shell with a pre-defined GHC version, choose one of the scripts
41
-
listed above and run the following command:
42
+
Alternatively, if you are using [nix-direnv](https://github.com/nix-community/nix-direnv) (recommended), you can run:
42
43
43
-
```sh
44
-
./bin/ghc90
45
44
```
46
-
47
-
Once inside the shell, verify the GHC version matches the script name:
48
-
49
-
```
50
-
ghc --version
45
+
direnv allow
51
46
```
52
47
53
-
After that, all commands detailed in the [Getting
54
-
Started](../README.md#getting-started) section should work the same.
55
-
56
-
Alternatively, to run a command without spawning a new shell use the `-c`
57
-
option:
58
-
59
-
```sh
60
-
./bin/ghc90 -c <command>
61
-
```
48
+
that will enable the development shell according to the contents of [.envrc](../.envrc). It is advisable not to run `direnv allow` blindly and always check the contents of [.envrc](../.envrc) files first to ensure nothing malicious is executed.
0 commit comments