Unverified Commit c207940c authored by Philip Taron's avatar Philip Taron Committed by GitHub
Browse files

mailutils: revert use of nss_wrapper for tests (#503376)

parents 03f99f47 f1016868
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -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 = {