zstd: do not cross-compile tests
This commit is contained in:
parent
29bc87e961
commit
9e4a925caf
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue