diff --git a/pkgs/by-name/li/libvncserver/package.nix b/pkgs/by-name/li/libvncserver/package.nix index ecaceb3c56ad..5daa8e6d1f17 100644 --- a/pkgs/by-name/li/libvncserver/package.nix +++ b/pkgs/by-name/li/libvncserver/package.nix @@ -44,8 +44,17 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "WITH_SYSTEMD" withSystemd) (lib.cmakeBool "BUILD_SHARED_LIBS" enableShared) (lib.cmakeBool "WITH_EXAMPLES" buildExamples) + (lib.cmakeBool "WITH_TESTS" finalAttrs.doCheck) ]; + # This test checks if using the **installed** headers works. + # As it doesn't set the include paths correctly, and we have nixpkgs-review to check if + # packages continue to build, patching it would serve no purpose, so we can just remove the test entirely. + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace-fail 'add_test(NAME includetest COMMAND' '# add_test(NAME includetest COMMAND' + ''; + buildInputs = [ libjpeg @@ -61,6 +70,8 @@ stdenv.mkDerivation (finalAttrs: { zlib ]; + doCheck = enableShared; + meta = with lib; { description = "VNC server library"; homepage = "https://libvnc.github.io/";