lib/sources.nix@commitIdFromGitRepo: parenthesize what should always have been

Fixes error: cannot coerce a partially applied built-in function to a string, at lib/sources.nix:59:32

I don't understand how this used to work, but doesn't work anymore?
This commit is contained in:
obadz 2016-08-08 11:43:39 +01:00
parent 2d71df18d3
commit f242b752fe

View File

@ -58,7 +58,7 @@ rec {
else if lib.pathExists packedRefsName
then
let fileContent = readFile packedRefsName;
matchRef = match ".*\n([^\n ]*) " + file + "\n.*" fileContent;
matchRef = match (".*\n([^\n ]*) " + file + "\n.*") fileContent;
in if isNull matchRef
then throw ("Could not find " + file + " in " + packedRefsName)
else lib.head matchRef