From bb0fe02c06ab1cac429aa60ddeb379c04cf91371 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman <145775305+xokdvium@users.noreply.github.com> Date: Sun, 2 Feb 2025 18:10:12 +0300 Subject: [PATCH] restinio: fix build Test builds fail with cmake configuration error: > string sub-command JSON failed parsing json string: * Line 1, Column 1 This is a silly regression from catch2_3 3.7.1 -> 3.8.0 bump [1]. Looks like the upstream doesn't hold catch2 correctly and overrides `main` for this test so catch2 test discovery machinery can't work. Upstream issue [2]. [1]: https://www.github.com/NixOS/nixpkgs/pull/371311 [2]: https://www.github.com/Stiffstream/restinio/issues/230 --- pkgs/by-name/re/restinio/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/re/restinio/package.nix b/pkgs/by-name/re/restinio/package.nix index 0d267b42cc1f..005c147e13ff 100644 --- a/pkgs/by-name/re/restinio/package.nix +++ b/pkgs/by-name/re/restinio/package.nix @@ -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 ];