Skip to content

Commit f8d76a7

Browse files
authored
fix bug: fetchPackageRepo (#2327)
1 parent 9d55e30 commit f8d76a7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/call-cabal-project-to-nix.nix

+5-4
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,11 @@ let
193193
then fetchgit { inherit (repoData) url sha256; rev = repoData.rev or repoData.ref; }
194194
else
195195
let drv = builtins.fetchGit
196-
{ inherit (repoData) url ; ref = repoData.ref or null; }
197-
# fetchGit does not accept "null" as rev, so when it's null
198-
# we have to omit the argument completely.
199-
// pkgs.lib.optionalAttrs (repoData ? rev) { inherit (repoData) rev; };
196+
({ inherit (repoData) url ; }
197+
# fetchGit does not accept "null" as rev and ref, so when it's null
198+
# we have to omit the argument completely.
199+
// pkgs.lib.optionalAttrs (repoData ? ref) { inherit (repoData) ref; }
200+
// pkgs.lib.optionalAttrs (repoData ? rev) { inherit (repoData) rev; });
200201
in __trace "WARNING: No sha256 found for source-repository-package ${repoData.url} ref=${repoData.ref or "(unspecified)"} rev=${repoData.rev or "(unspecified)"} download may fail in restricted mode (hydra)"
201202
(__trace "Consider adding `--sha256: ${hashPath drv}` to the ${cabalProjectFileName} file or passing in a sha256map argument"
202203
drv);

0 commit comments

Comments
 (0)