From e542ff7288e3712d66e534659fddafce5ddda5f7 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 28 Jul 2014 20:27:20 +0200 Subject: [PATCH] libtoxcore: Enable and fix up running test suite. We not only require libcheck but also needed to disable a few tests, without providing the former, test cases were signalled as being run successfully but weren't actually run. Signed-off-by: aszlig --- pkgs/development/libraries/libtoxcore/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libtoxcore/default.nix b/pkgs/development/libraries/libtoxcore/default.nix index 48e78bc41315..6741838d33b6 100644 --- a/pkgs/development/libraries/libtoxcore/default.nix +++ b/pkgs/development/libraries/libtoxcore/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, autoconf, libtool, automake, libsodium, ncurses, libopus -, libvpx, libconfig, pkgconfig }: +, libvpx, check, libconfig, pkgconfig }: let version = "e1158be5a6"; @@ -14,6 +14,17 @@ stdenv.mkDerivation rec { sha256 = "1rsh1pbwvngsx5slmd6608b1zqs3jvq70bjr9zyziap9vxka3z1v"; }; + NIX_LDFLAGS = "-lgcc_s"; + + postPatch = '' + # within Nix chroot builds, localhost is unresolvable + sed -i -e '/DEFTESTCASE(addr_resolv_localhost)/d' \ + auto_tests/network_test.c + # takes WAAAY too long (~10 minutes) and would timeout + sed -i -e '/DEFTESTCASE[^(]*(many_clients\>/d' \ + auto_tests/tox_test.c + ''; + preConfigure = '' autoreconf -i ''; @@ -26,7 +37,7 @@ stdenv.mkDerivation rec { buildInputs = [ autoconf libtool automake libsodium ncurses libopus - libvpx libconfig pkgconfig + libvpx check libconfig pkgconfig ]; doCheck = true;