From f1016868df7c25f6aeedae64ea6685c5f5a01729 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 25 Mar 2026 14:28:24 +0100 Subject: [PATCH] mailutils: revert use of nss_wrapper for tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- pkgs/by-name/ma/mailutils/package.nix | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pkgs/by-name/ma/mailutils/package.nix b/pkgs/by-name/ma/mailutils/package.nix index 10e2b3c8b142..33011d4ddf08 100644 --- a/pkgs/by-name/ma/mailutils/package.nix +++ b/pkgs/by-name/ma/mailutils/package.nix @@ -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 = {