Merge pull request #202370 from Artturin/revertpartof1

Revert "lib/trivial: fix 'error: cannot decode virtual path '/nix/sto…
This commit is contained in:
Artturi 2022-11-22 19:49:35 +02:00 committed by GitHub
commit 761a5ba7d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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