Commit f78e186
Add context back to repo url strings (input-output-hk#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 = __substring 0 (__stringLength p.pkg-src-sha256 - 6) p.pkg-src-sha256 + "000000";
```
* Update lib/load-cabal-plan.nix
Co-authored-by: Moritz Angermann <[email protected]>
* Bump test `repository` blocks
---------
Co-authored-by: Moritz Angermann <[email protected]>1 parent 706698d commit f78e186
2 files changed
+37
-13
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 | | |
| |||
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
103 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
104 | 118 | | |
105 | 119 | | |
106 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
21 | | - | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | | - | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | | - | |
| 40 | + | |
31 | 41 | | |
32 | 42 | | |
33 | | - | |
34 | | - | |
| 43 | + | |
| 44 | + | |
35 | 45 | | |
36 | | - | |
| 46 | + | |
37 | 47 | | |
38 | 48 | | |
39 | | - | |
40 | | - | |
| 49 | + | |
| 50 | + | |
0 commit comments