mailutils: revert use of nss_wrapper for tests

This was introduced because of "the nix sandbox's /etc/passwd which
has literal quotes around the home directory field", but this doesn't
seem to be a standard configuration.  Using nss_wrapper causes other
problems — it's not supported on Darwin or musl.
This commit is contained in:
Alyssa Ross
2026-03-25 14:32:14 +01:00
parent 313b55af49
commit f1016868df
-14
View File
@@ -25,7 +25,6 @@
system-sendmail,
libxcrypt,
mkpasswd,
nss_wrapper,
pythonSupport ? true,
guileSupport ? true,
@@ -113,21 +112,8 @@ stdenv.mkDerivation (finalAttrs: {
nativeCheckInputs = [
dejagnu
mkpasswd
nss_wrapper
];
preCheck = ''
# The nix sandbox's /etc/passwd has literal quotes around the home directory
# (e.g. "/build" instead of /build). imap4d's mu_homedir_assert (new in
# 3.21) calls stat() on this path, which fails because no directory named
# '"/build"' exists. Use nss_wrapper to provide a fixed passwd to the tests.
sed 's/"//g' /etc/passwd > "$TMPDIR/passwd"
sed 's/"//g' /etc/group > "$TMPDIR/group" 2>/dev/null || echo "nixbld:x:100:" > "$TMPDIR/group"
export LD_PRELOAD="${nss_wrapper}/lib/libnss_wrapper.so"
export NSS_WRAPPER_PASSWD="$TMPDIR/passwd"
export NSS_WRAPPER_GROUP="$TMPDIR/group"
'';
doCheck = !stdenv.hostPlatform.isDarwin; # ERROR: All 46 tests were run, 46 failed unexpectedly.
meta = {