@@ -1,4 +1,4 @@
1−# Source Repository Hashes
1+# Handling git repositories in projects
3Both `stack.yaml` and `cabal.project` files can contain references
3Both `stack.yaml` and `cabal.project` files can contain references
4to git repositories containing the version of a particular package
4to 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
27−If you have a cabal project add a `--sha256` comment to the
27+## Cabal.project
28−`cabal.project` file:
29+Add a `--sha256` comment to the `cabal.project` file:
31source-repository-package
32source-repository-package
@@ -36,8 +37,9 @@ source-repository-package
36 --sha256: 003lm3pm024vhbfmii7xcdd9v2rczpflxf7gdl2pyxia7p014i8z
37 --sha256: 003lm3pm024vhbfmii7xcdd9v2rczpflxf7gdl2pyxia7p014i8z
39−If you have a stack project add a `# nix-sha256` comment to the
42+Add a `# nix-sha256` comment to the `stack.yaml` file:
43extra-deps:
45extra-deps:
@@ -48,14 +50,14 @@ extra-deps:
48 # nix-sha256: 003lm3pm024vhbfmii7xcdd9v2rczpflxf7gdl2pyxia7p014i8z
50 # nix-sha256: 003lm3pm024vhbfmii7xcdd9v2rczpflxf7gdl2pyxia7p014i8z
51−## sha256map
53+## Avoding modifying cabal.project and stack.yaml
53In some cases we cannot modify the `cabal.project` or `stack.yaml` file
55In some cases we cannot modify the `cabal.project` or `stack.yaml` file
54to add sha256 comments. As an alternative we can pass in a `sha256map`
56to add sha256 comments. As an alternative we can pass in a `sha256map`
55For instance pandoc includes a `cabal.project` file in hackage includes a
57For instance pandoc includes a `cabal.project` file in hackage includes a
56`source-package-reference` to `pandoc-citeproc`:
58`source-package-reference` to `pandoc-citeproc`:
59{ haskell-nix, testSrc } :
61{ haskell-nix, testSrc } :
61 pandoc = haskell-nix.hackage-package {
63 pandoc = haskell-nix.hackage-package {