@@ -1,4 +1,4 @@
1−# Source Repository Hashes
1+# Handling git repositories in projects
22
33Both `stack.yaml` and `cabal.project` files can contain references
44to git repositories containing the version of a particular package
@@ -24,8 +24,9 @@ $ nix-prefetch-git https://github.com/input-output-hk/haskell.nix.git bc01ebc05a
2424}
2525```
2626
27−If you have a cabal project add a `--sha256` comment to the
28−`cabal.project` file:
27+## Cabal.project
28+
29+Add a `--sha256` comment to the `cabal.project` file:
2930
3031```
3132source-repository-package
@@ -36,8 +37,9 @@ source-repository-package
3637 --sha256: 003lm3pm024vhbfmii7xcdd9v2rczpflxf7gdl2pyxia7p014i8z
3738```
3839
39−If you have a stack project add a `# nix-sha256` comment to the
40−`stack.yaml` file:
40+## Stack
41+
42+Add a `# nix-sha256` comment to the `stack.yaml` file:
4143
4244```
4345extra-deps:
@@ -48,14 +50,14 @@ extra-deps:
4850 # nix-sha256: 003lm3pm024vhbfmii7xcdd9v2rczpflxf7gdl2pyxia7p014i8z
4951```
5052
51−## sha256map
53+## Avoding modifying cabal.project and stack.yaml
5254
5355In some cases we cannot modify the `cabal.project` or `stack.yaml` file
5456to add sha256 comments. As an alternative we can pass in a `sha256map`
5557For instance pandoc includes a `cabal.project` file in hackage includes a
5658`source-package-reference` to `pandoc-citeproc`:
5759
58−```
60+```nix
5961{ haskell-nix, testSrc } :
6062let
6163 pandoc = haskell-nix.hackage-package {