Skip to content

Commit c22fb2e

Browse files
authored
inputMap: add missing fallback to repoData.rev (#1818)
to properly support inputMap keys without rev.
1 parent 1059fc7 commit c22fb2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ let
224224
then inputMap."${repoData.url}/${repoData.rev or repoData.ref}"
225225
else if inputMap ? ${repoData.url}
226226
then
227-
(if inputMap.${repoData.url}.rev != repoData.ref
228-
then throw "${inputMap.${repoData.url}.rev} may not match ${repoData.ref} for ${repoData.url} use \"${repoData.url}/${repoData.ref}\" as the inputMap key if ${repoData.ref} is a branch or tag that points to ${inputMap.${repoData.url}.rev}."
227+
(if inputMap.${repoData.url}.rev != (repoData.rev or repoData.ref)
228+
then throw "${inputMap.${repoData.url}.rev} may not match ${repoData.rev or repoData.ref} for ${repoData.url} use \"${repoData.url}/${repoData.rev or repoData.ref}\" as the inputMap key if ${repoData.rev or repoData.ref} is a branch or tag that points to ${inputMap.${repoData.url}.rev}."
229229
else inputMap.${repoData.url})
230230
else if repoData.sha256 != null
231231
then fetchgit { inherit (repoData) url sha256; rev = repoData.rev or repoData.ref; }

0 commit comments

Comments
 (0)