From 699f1d0c762ba89af507617c88c4f01f340760df Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 18 Feb 2023 15:06:12 +0100 Subject: [PATCH] mailutils: fix and enable testing * Remove readmsg-tests: the missing files are now present and the files that were fetched caused test failures. * Remove references to maidag, it was removed upstream. * Fix test macro and enable tests. --- pkgs/tools/networking/mailutils/default.nix | 27 ++++----------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/networking/mailutils/default.nix b/pkgs/tools/networking/mailutils/default.nix index 445b1c213ddf..2ce2414b50ae 100644 --- a/pkgs/tools/networking/mailutils/default.nix +++ b/pkgs/tools/networking/mailutils/default.nix @@ -94,31 +94,15 @@ stdenv.mkDerivation rec { ] ++ lib.optional (!pythonSupport) "--without-python" ++ lib.optional (!guileSupport) "--without-guile"; - readmsg-tests = let - p = "https://raw.githubusercontent.com/gentoo/gentoo/9c921e89d51876fd876f250324893fd90c019326/net-mail/mailutils/files"; - in [ - (fetchurl { url = "${p}/hdr.at"; sha256 = "0phpkqyhs26chn63wjns6ydx9468ng3ssbjbfhcvza8h78jlsd98"; }) - (fetchurl { url = "${p}/nohdr.at"; sha256 = "1vkbkfkbqj6ml62s1am8i286hxwnpsmbhbnq0i2i0j1i7iwkk4b7"; }) - (fetchurl { url = "${p}/twomsg.at"; sha256 = "15m29rg2xxa17xhx6jp4s2vwa9d4khw8092vpygqbwlhw68alk9g"; }) - (fetchurl { url = "${p}/weed.at"; sha256 = "1101xakhc99f5gb9cs3mmydn43ayli7b270pzbvh7f9rbvh0d0nh"; }) - ]; - nativeCheckInputs = [ dejagnu ]; - doCheck = false; # fails 1 out of a bunch of tests, looks like a bug + doCheck = true; doInstallCheck = false; # fails preCheck = '' - # Add missing test files - cp ${builtins.toString readmsg-tests} readmsg/tests/ - for f in hdr.at nohdr.at twomsg.at weed.at; do - mv readmsg/tests/*-$f readmsg/tests/$f - done # Disable comsat tests that fail without tty in the sandbox. tty -s || echo > comsat/tests/testsuite.at - # Disable lmtp tests that require root spool. - echo > maidag/tests/lmtp.at - # Disable mda tests that require /etc/passwd to contain root. - grep -qo '^root:' /etc/passwd || echo > maidag/tests/mda.at + # Remove broken macro + sed -i '/AT_TESTED/d' libmu_scm/tests/testsuite.at # Provide libraries for mhn. export LD_LIBRARY_PATH=$(pwd)/lib/.libs ''; @@ -145,9 +129,8 @@ stdenv.mkDerivation rec { Scheme. The utilities provided by Mailutils include imap4d and pop3d mail - servers, mail reporting utility comsatd, general-purpose mail delivery - agent maidag, mail filtering program sieve, and an implementation of MH - message handling system. + servers, mail reporting utility comsatd, mail filtering program sieve, + and an implementation of MH message handling system. ''; license = with licenses; [