modctl: fix install check on aarch64-darwin

modctl creates a ~/.modctl directory before running any cobra command.
Go's os/user package doesn't respect $HOME on darwin and does system calls
directly, so the installCheckPhase fails there.

Pass --log-dir and --storage-dir pointing at $TMPDIR to avoid touching $HOME.
This commit is contained in:
gbhu753
2026-06-28 18:24:27 +12:00
parent 860aca60fd
commit cacd8e4dbb
+1 -1
View File
@@ -28,7 +28,7 @@ buildGoModule rec {
installCheckPhase = ''
runHook preInstallCheck
$out/bin/modctl --help > /dev/null
$out/bin/modctl version 2>&1 | grep -q "v${version}"
$out/bin/modctl version --log-dir="$TMPDIR" --storage-dir="$TMPDIR" 2>&1 | grep -q "v${version}"
runHook postInstallCheck
'';