You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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 <[email protected]>
* Bump test `repository` blocks
---------
Co-authored-by: Moritz Angermann <[email protected]>
# repo.uri might look like file:/nix/store/xxx; using addContext, we let nix know about the dependency on
114
+
# /nix/store/xxx. Otherwise we can run into the situation where nix won't be able to access the dependencies needed to build. (e.g. the /nix/store/xxx path).
0 commit comments