uriparser: Fix cross building

When cross building, we need to disable building tests or cmake will
complain about the missing gtest.

Also switching from targetPlatform to buildPlatform caused doCheck to be
properly set to false
This commit is contained in:
Janne Heß 2022-01-17 15:24:45 +01:00
parent 483aec3fe0
commit 9049874ff1
No known key found for this signature in database
GPG key ID: 69165158F05265DF

View file

@ -14,10 +14,10 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DURIPARSER_BUILD_DOCS=OFF"
];
] ++ lib.optional (!doCheck) "-DURIPARSER_BUILD_TESTS=OFF";
checkInputs = [ gtest ];
doCheck = stdenv.targetPlatform.system == stdenv.hostPlatform.system;
doCheck = stdenv.buildPlatform == stdenv.hostPlatform;
meta = with lib; {
homepage = "https://uriparser.github.io/";