From b67ee6e861903abb04e9024d605dfc7b00922633 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 6 Nov 2022 06:16:13 +0200 Subject: [PATCH] lib/trivial: fix 'error: cannot decode virtual path '/nix/store/virtual0000000000000000000000005-source'' happens on lazy-trees branch of Nix (NixOS/nix#6530) --- lib/trivial.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/trivial.nix b/lib/trivial.nix index 5d4fad8266bc..8f2023caaf8e 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 = "${toString ./..}/.git-revision"; - gitRepo = "${toString ./..}/.git"; + revisionFile = ./.. + "/.git-revision"; + gitRepo = ./.. + "/.git"; in if lib.pathIsGitRepo gitRepo then lib.commitIdFromGitRepo gitRepo else if lib.pathExists revisionFile then lib.fileContents revisionFile