diff --git a/lib/cabal-project-parser.nix b/lib/cabal-project-parser.nix index 9f34c47caa..3793bb3fe6 100644 --- a/lib/cabal-project-parser.nix +++ b/lib/cabal-project-parser.nix @@ -76,7 +76,7 @@ let # (used in call-cabal-project-to-nix.nix to create a fixed-output derivation) extractSourceRepoPackageData = cabalProjectFileName: sha256map: repo: { url = repo.location; - ref = repo.tag; + ref = if repo ? commit then repo.commit else repo.tag; sha256 = repo."--sha256" or ( if sha256map != null then sha256map."${repo.location}"."${repo.tag}"