From 791d9f749f248aa614033a1cf8701ecaecde19e1 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 23 Sep 2025 02:45:50 +0200 Subject: [PATCH] thrift: ctestCheckHook --- pkgs/by-name/th/thrift/package.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/th/thrift/package.nix b/pkgs/by-name/th/thrift/package.nix index eed8dc883783..a0812de681c6 100644 --- a/pkgs/by-name/th/thrift/package.nix +++ b/pkgs/by-name/th/thrift/package.nix @@ -11,6 +11,7 @@ pkg-config, bison, flex, + ctestCheckHook, static ? stdenv.hostPlatform.isStatic, }: @@ -59,6 +60,8 @@ stdenv.mkDerivation (finalAttrs: { zlib ]; + nativeCheckInputs = [ ctestCheckHook ]; + preConfigure = '' export PY_PREFIX=$out ''; @@ -74,16 +77,12 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "BUILD_TESTING" (!static)) ]; + disabledTests = [ + "UnitTests" # getaddrinfo() -> -3; Temporary failure in name resolution + "python_test" # many failures about python 2 or network things + ]; doCheck = !static; - checkPhase = '' - runHook preCheck - - ${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH=$PWD/lib ctest -E "($(echo "$disabledTests" | tr " " "|"))" - - runHook postCheck - ''; - enableParallelChecking = false; meta = with lib; {