Skip to content

Commit de5afd7

Browse files
committed
Fix repo-tar downloads
1 parent 7a225bc commit de5afd7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/load-cabal-plan.nix

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ in {
9494
# parsing the `cabal.project` file.
9595
src = pkgs.lib.lists.elemAt callProjectResults.sourceRepos (pkgs.lib.strings.toInt p.pkg-src.source-repo.location)
9696
+ pkgs.lib.optionalString (p.pkg-src.source-repo.subdir != ".") "/${p.pkg-src.source-repo.subdir}";
97+
} // pkgs.lib.optionalAttrs (p.pkg-src.type or "" == "repo-tar") {
98+
src = pkgs.fetchurl {
99+
url = 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";
100+
sha256 = p.pkg-src-sha256;
101+
};
97102
} // pkgs.lib.optionalAttrs (cabal2nix ? package-description-override && p.pkg-version == cabal2nix.package.identifier.version) {
98103
# Use the `.cabal` file from the `Cabal2Nix` if it for the matching
99104
# version of the package (the one in the plan).

0 commit comments

Comments
 (0)