diff --git a/lib/trivial.nix b/lib/trivial.nix index 142ed32c9e5a6..0e02660d6b35a 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -213,8 +213,8 @@ rec { # Default value to return if revision can not be determined default: let - revisionFile = ./.. + "/.git-revision"; - gitRepo = ./.. + "/.git"; + revisionFile = "${toString ./..}/.git-revision"; + gitRepo = "${toString ./..}/.git"; in if lib.pathIsGitRepo gitRepo then lib.commitIdFromGitRepo gitRepo else if lib.pathExists revisionFile then lib.fileContents revisionFile