Commit 82d4d20
Add context back to repo url strings (#2261)
* Add context back to repo url strings
This should fixes a source of errors that look like this:
```
curl: (37) Couldn't open file /nix/store/7g8b1vz8nlai5zkjzfps25jl7fvdjk3s-source/package/contra-tracer-0.1.0.2.tar.gz
```
Reproducing this issue turned out to be difficult because if the `sha256` is in the nix cache there is no error. To reproduce the issue:
* Remove the `addContext` call.
* Build a project with `repository` in `cabal.project` with an `inputMap`.
* Force the `src` derivation to rebuild.
We can force the src derivation to rebuild by giving it invalid `sha256` (ignore the hash mismatch errors, if it has a hash then the download worked):
```
# sha256 = p.pkg-src-sha256;
sha256 = __substring 0 (__stringLength p.pkg-src-sha256 - 6) p.pkg-src-sha256 + "000000";
```
* Update lib/load-cabal-plan.nix
Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
* Bump test `repository` blocks
---------
Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>1 parent 4035dc4 commit 82d4d20
2 files changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
107 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
0 commit comments