1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 05:56:03 +01:00

don't include derivation name in temporary build directories

With the migration to /nix/var/nix/builds we now have failing builds
when the derivation name is too long.
This change removes the derivation name from the temporary build to have
a predictable prefix length:

Also see: https://github.com/NixOS/infra/pull/764
for context.
This commit is contained in:
Jörg Thalheim 2025-08-27 09:29:47 +02:00
parent 8ee74792fe
commit 725a2f379f
4 changed files with 14 additions and 8 deletions

View file

@ -706,7 +706,7 @@ void DerivationBuilderImpl::startBuilder()
/* Create a temporary directory where the build will take
place. */
topTmpDir = createTempDir(buildDir, "nix-build-" + std::string(drvPath.name()), 0700);
topTmpDir = createTempDir(buildDir, "nix", 0700);
setBuildTmpDir();
assert(!tmpDir.empty());