Skip to content

Commit

Permalink
restinio: fix darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
xokdvium committed Feb 2, 2025
1 parent bb0fe02 commit 97ae828
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pkgs/by-name/re/restinio/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 97ae828

Please sign in to comment.