diff --git a/src/libstore/build.cc b/src/libstore/build.cc index f702433a0..31631ed3f 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -2010,9 +2010,9 @@ void DerivationGoal::startBuilder() Samba-in-QEMU. */ createDirs(chrootRootDir + "/etc"); - writeFile(chrootRootDir + "/etc/passwd", - "root:x:0:0:Nix build user:/:/noshell\n" - "nobody:x:65534:65534:Nobody:/:/noshell\n"); + writeFile(chrootRootDir + "/etc/passwd", fmt( + "root:x:0:0:Nix build user:%s:/noshell\n" + "nobody:x:65534:65534:Nobody:/:/noshell\n", "/tmp")); /* Declare the build user's group so that programs get a consistent view of the system (e.g., "id -gn"). */