From 9049874ff1e79408862d0ca7b854315c20526c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Mon, 17 Jan 2022 15:24:45 +0100 Subject: [PATCH] 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 --- pkgs/development/libraries/uriparser/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/uriparser/default.nix b/pkgs/development/libraries/uriparser/default.nix index 0c48c6500c5..28eea052517 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/";