From f242b752fec061ec5afe6f1b3b5f948bded23e9a Mon Sep 17 00:00:00 2001
From: obadz <obadz-git@obadz.com>
Date: Mon, 8 Aug 2016 11:43:39 +0100
Subject: [PATCH] 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?
---
 lib/sources.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/sources.nix b/lib/sources.nix
index 49dcd6d3dd2a..156afaae5c98 100644
--- a/lib/sources.nix
+++ b/lib/sources.nix
@@ -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