diff --git a/third_party/nix/src/libstore/build.cc b/third_party/nix/src/libstore/build.cc index e7a9ea45e..dcc3c7edc 100644 --- a/third_party/nix/src/libstore/build.cc +++ b/third_party/nix/src/libstore/build.cc @@ -2490,7 +2490,7 @@ void DerivationGoal::initTmpDir() { env[i.first] = i.second; } else { auto hash = hashString(htSHA256, i.first); - std::string fn = ".attr-" + hash.to_string(); + std::string fn = ".attr-" + hash.to_string(Base32, false); Path p = tmpDir + "/" + fn; writeFile(p, rewriteStrings(i.second, inputRewrites)); chownToBuilder(p); diff --git a/third_party/nix/tests/pass-as-file.sh b/third_party/nix/tests/pass-as-file.sh index 3dfe10baa..2c0bc5031 100644 --- a/third_party/nix/tests/pass-as-file.sh +++ b/third_party/nix/tests/pass-as-file.sh @@ -10,6 +10,7 @@ mkDerivation { passAsFile = [ \"foo\" ]; foo = [ \"xyzzy\" ]; builder = builtins.toFile \"builder.sh\" '' + [ \"\$(basename \$fooPath)\" = .attr-1bp7cri8hplaz6hbz0v4f0nl44rl84q1sg25kgwqzipzd1mv89ic ] [ \"\$(cat \$fooPath)\" = xyzzy ] touch \$out '';