Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restinio: fix build #375955

Merged
merged 2 commits into from
Feb 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions pkgs/by-name/re/restinio/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-heVdo0MtsWi/r9yse+/FZ55lhiunyEdwB3UkOOY5Vj0=";
};

# https://www.github.com/Stiffstream/restinio/issues/230
# > string sub-command JSON failed parsing json string: * Line 1, Column 1
# > Syntax error: value, object or array expected.
postPatch = ''
substituteInPlace dev/test/CMakeLists.txt \
--replace-fail "add_subdirectory(metaprogramming)" ""
'';

strictDeps = true;

nativeBuildInputs = [ cmake ];
Expand Down Expand Up @@ -74,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