restinio: fix darwin

This commit is contained in:
Sergei Zimmerman
2025-02-02 21:05:36 +03:00
parent bb0fe02c06
commit 97ae8286a5

View File

@@ -82,6 +82,28 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
enableParallelChecking = false;
__darwinAllowLocalNetworking = true;
preCheck =
let
disabledTests =
[ ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Tests that fail with error: 'unable to write: Operation not permitted'
"HTTP echo server"
"single_thread_connection_limiter"
"simple sendfile"
"simple sendfile with std::filesystem::path"
"sendfile the same file several times"
"sendfile 2 files"
"sendfile offsets_and_size"
"sendfile chunks"
"sendfile with partially-read response"
];
excludeRegex = "^(${builtins.concatStringsSep "|" disabledTests})";
in
lib.optionalString (builtins.length disabledTests != 0) ''
checkFlagsArray+=(ARGS="--exclude-regex '${excludeRegex}'")
'';
meta = with lib; {
description = "Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library";