Skip to content

Commit 6bdd99f

Browse files
hamishmackangerman
andauthored
Update lib/load-cabal-plan.nix
Co-authored-by: Moritz Angermann <[email protected]>
1 parent a15aad8 commit 6bdd99f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/load-cabal-plan.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ in {
110110
+ pkgs.lib.optionalString (p.pkg-src.source-repo.subdir != ".") "/${p.pkg-src.source-repo.subdir}";
111111
} // pkgs.lib.optionalAttrs (p.pkg-src.type or "" == "repo-tar") {
112112
src = pkgs.lib.mkDefault (pkgs.fetchurl {
113+
# 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).
113115
url = addContext p.pkg-src.repo.uri + "${pkgs.lib.optionalString (!pkgs.lib.hasSuffix "/" p.pkg-src.repo.uri) "/"}package/${p.pkg-name}-${p.pkg-version}.tar.gz";
114116
sha256 = p.pkg-src-sha256;
115117
});

0 commit comments

Comments
 (0)