From 9ed7f526858318ced48a2c61af7c44ed0eb6386e Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 18 Apr 2026 20:25:55 +0200 Subject: [PATCH] nix: put tmpdirs directly into /tmp to fix long unix socket paths I'm not sure whether that's Lix specific, but when I enter nix-shell, I get quite a long TMPDIR, which results in all postgrest-with-pg-XX scripts failing, because the unix socket path is too long. If TMPDIR was not set, mktemp would fall back to /tmp, so we can just do that in any case, which guarantees a short path in every case. --- nix/overlays/checked-shell-script/checked-shell-script.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/overlays/checked-shell-script/checked-shell-script.nix b/nix/overlays/checked-shell-script/checked-shell-script.nix index d541b59ae..1bd975eb1 100644 --- a/nix/overlays/checked-shell-script/checked-shell-script.nix +++ b/nix/overlays/checked-shell-script/checked-shell-script.nix @@ -104,7 +104,7 @@ let '' + lib.optionalString withTmpDir '' - tmpdir="$(${coreutils}/bin/mktemp -d --tmpdir ${name}-XXX)" + tmpdir="$(${coreutils}/bin/mktemp -d --tmpdir=/tmp ${name}-XXX)" # we keep the tmpdir when an error occurs for debugging trap 'echo Temporary directory kept at: $tmpdir' ERR