@@ -5,12 +5,14 @@
55or [Stack](https://docs.haskellstack.org/en/stable/README/#quick-start-guide)
66project and its dependencies into Nix code.
77
8−Assuming you have [Nix installed](https://nixos.org/download.html), you can start setting up your project.
8+Assuming you have [Nix](https://nixos.org/download.html) installed, you can
9+start setting up your project.
910
1011## Setting up the Cachix binary cache
1112
12−You can **avoid compiling GHC and nix-tools** by configuring [Cachix](https://cachix.org)
13−so you can benefit from the binary cache built by CI:
13+You can **avoid compiling GHC and nix-tools** by configuring
14+[Cachix](https://cachix.org) so you can benefit from the binary cache built by
15+CI:
1416
1517```bash
1618$ nix-env -iA cachix -f https://cachix.org/api/v1/install
@@ -33,13 +35,13 @@ Add `default.nix`:
3335{ # Fetch the latest haskell.nix and import its default.nix
3436 haskellNix ? import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}
3537
36−# haskell.nix provides access to the nixpkgs pins which are used by our CI, hence
37−# you will be more likely to get cache hits when using these.
38−# But you can also just use your own, e.g. '<nixpkgs>'
38+# haskell.nix provides access to the nixpkgs pins which are used by our CI,
39+# hence you will be more likely to get cache hits when using these.
40+# But you can also just use your own, e.g. '<nixpkgs>'.
3941, nixpkgsSrc ? haskellNix.sources.nixpkgs-2003
4042
41−# haskell.nix provides some arguments to be passed to nixpkgs, including some patches
42−# and also the haskell.nix functionality itself as an overlay.
43+# haskell.nix provides some arguments to be passed to nixpkgs, including some
44+# patches and also the haskell.nix functionality itself as an overlay.
4345, nixpkgsArgs ? haskellNix.nixpkgsArgs
4446
4547# import nixpkgs with overlays
@@ -84,20 +86,20 @@ cabal new-build your-package-name
8486
8587To open a shell for use with `stack` see [the following issue](https://github.com/input-output-hk/haskell.nix/issues/689#issuecomment-643832619).
8688
87−### Pinning the [Haskell.nix][] version
89+### Pinning the [haskell.nix][] version
8890
8991For simplicity's sake we will use `fetchTarball` for the examples in
9092this documentation. This will always get the latest version, and is
9193similar to an auto-updating Nix channel.
9294
93−However, in your own project, you may wish to pin [Haskell.nix][] (as
95+However, in your own project, you may wish to pin [haskell.nix][] (as
9496you would pin Nixpkgs). This will make your builds reproducible, more
9597predictable, and faster (because the fixed version is cached).
9698
97−Straightforward way of doing this is to change branch name to a revision.
99+Straightforward way of doing this is to change the branch name to a revision.
98100
99101```nix
100−{ # Fetch the latest haskell.nix and import its default.nix
102+{ # Fetch a specific haskell.nix and import its default.nix
101103 haskellNix ? import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/f1a94a4c82a2ab999a67c3b84269da78d89f0075.tar.gz") {}
102104
103105...
@@ -111,4 +113,4 @@ There are other possible schemes for pinning. See
111113
112114There are a number of things to explore further in the tutorials section.
113115
114−[haskell.nix]: https://github.com/input-output-hk/haskell.nix
116+[haskell.nix]: https://github.com/input-output-hk/haskell.nix