about summary refs log tree commit diff
path: root/pkgs/development/libraries/uriparser
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2022-01-17 15:24:45 +0100
committerJanne Heß <janne@hess.ooo>2022-01-17 15:44:22 +0100
commit9049874ff1e79408862d0ca7b854315c20526c73 (patch)
treebdb54c465378537cddf8e0f966cc90b035ab6a9b /pkgs/development/libraries/uriparser
parent483aec3fe0afffa1d43b45c28d947e46394e7562 (diff)
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
Diffstat (limited to 'pkgs/development/libraries/uriparser')
-rw-r--r--pkgs/development/libraries/uriparser/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/libraries/uriparser/default.nix b/pkgs/development/libraries/uriparser/default.nix
index 0c48c6500c534..28eea0525176d 100644
--- a/pkgs/development/libraries/uriparser/default.nix
+++ b/pkgs/development/libraries/uriparser/default.nix
@@ -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/";