diff --git a/pkgs/development/libraries/uriparser/default.nix b/pkgs/development/libraries/uriparser/default.nix index 03f8e20b38d0..ac9f67e1e129 100644 --- a/pkgs/development/libraries/uriparser/default.nix +++ b/pkgs/development/libraries/uriparser/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gtest, pkgconfig, doxygen, graphviz }: +{ lib, stdenv, fetchurl, gtest, pkgconfig, doxygen, graphviz }: stdenv.mkDerivation rec { name = "uriparser-${version}"; @@ -10,9 +10,11 @@ stdenv.mkDerivation rec { sha256 = "0b2yagxzhq9ghpszci6a9xlqg0yl7vq9j5r8dwbar3nszqsfnrzc"; }; - nativeBuildInputs = [ pkgconfig gtest doxygen graphviz ]; + nativeBuildInputs = [ pkgconfig doxygen graphviz ]; + buildInputs = lib.optional doCheck gtest; + configureFlags = lib.optional (!doCheck) "--disable-tests"; - doCheck = true; + doCheck = stdenv.targetPlatform.system == stdenv.hostPlatform.system; meta = with stdenv.lib; { homepage = https://uriparser.github.io/;