Files
lix/doc/manual/rl-next/added-shell-dir-length.md
T
Raito Bezarius 7fbb366ce2 lix/legacy/nix-build: save up 30ish chars in $NIX_BUILD_TOP
Alternative to cl/4661 discussed in #1044.

It can be assumed that `$tmpdir/build-top` can be created safely without
any risk, this way, we don't need to reuse the random directory creation
primitive.

Fixes #1044.

Change-Id: Iec52477f3047fc40959b183c607312d5a40fc8c9
Signed-off-by: Raito Bezarius <raito@lix.systems>
2025-12-06 19:48:08 +01:00

840 B

synopsis, cls, issues, category, credits
synopsis cls issues category credits
Nix shells' $NIX_BUILD_TOP are shorter
4663
fj#1044
Fixes
raito

Following the changes in 2.94.0 to shorten build directory paths, aimed at resolving UNIX domain socket length issues and improving nix-shell, we inadvertently introduced an excessively long path for the $NIX_BUILD_TOP environment variable used by Nix shells (their effective temporary /build directory).

To fix this, we replaced the build-top-$HASH directory name with simply build-top, reducing these paths by at least 30 characters.

We also added a test to ensure that Nix shells do not introduce more than 50 extra characters relative to their base directory (e.g., /tmp when $TMPDIR is not set).