zstd: do not cross-compile tests

This commit is contained in:
Emery Hemingway 2021-04-10 13:10:23 +02:00
parent 29bc87e961
commit 9e4a925caf

View file

@ -36,13 +36,15 @@ stdenv.mkDerivation rec {
tests/playTests.sh tests/playTests.sh
''; '';
cmakeFlags = [ cmakeFlags = lib.attrsets.mapAttrsToList
"-DZSTD_BUILD_SHARED:BOOL=${if (!static) then "ON" else "OFF"}" (name: value: "-DZSTD_${name}:BOOL=${if value then "ON" else "OFF"}") {
"-DZSTD_BUILD_STATIC:BOOL=${if static then "ON" else "OFF"}" BUILD_SHARED = !static;
"-DZSTD_PROGRAMS_LINK_SHARED:BOOL=${if (!static) then "ON" else "OFF"}" BUILD_STATIC = static;
"-DZSTD_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}" PROGRAMS_LINK_SHARED = !static;
"-DZSTD_BUILD_TESTS:BOOL=ON" LEGACY_SUPPORT = legacySupport;
]; BUILD_TESTS = doCheck;
};
cmakeDir = "../build/cmake"; cmakeDir = "../build/cmake";
dontUseCmakeBuildDir = true; dontUseCmakeBuildDir = true;
preConfigure = '' preConfigure = ''
@ -50,7 +52,7 @@ stdenv.mkDerivation rec {
''; '';
checkInputs = [ file ]; checkInputs = [ file ];
doCheck = true; doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
checkPhase = '' checkPhase = ''
runHook preCheck runHook preCheck
# Patch shebangs for playTests # Patch shebangs for playTests