From 3cda8e0ac1bde697a408992fde68d63612ddd185 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Sat, 25 Apr 2026 02:30:59 +0200 Subject: [PATCH] openvr: unbreak jsoncpp abi Signed-off-by: Sefa Eyeoglu --- pkgs/by-name/op/openvr/package.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/op/openvr/package.nix b/pkgs/by-name/op/openvr/package.nix index 65afa533f5b0..77f2baeaca4c 100644 --- a/pkgs/by-name/op/openvr/package.nix +++ b/pkgs/by-name/op/openvr/package.nix @@ -20,6 +20,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-xtCqro73fWQ6i0PiVmWYCK30DUSq1WeALoUolUjuWlE="; }; + postUnpack = '' + # Move in-tree jsoncpp out to complement the patch above + # fetchpatch2 is not able to handle these renames + mkdir source/thirdparty + mv source/src/json source/thirdparty/jsoncpp + ''; + patches = [ # https://github.com/ValveSoftware/openvr/pull/594 (fetchpatch2 { @@ -35,11 +42,10 @@ stdenv.mkDerivation (finalAttrs: { }) ]; - postUnpack = '' - # Move in-tree jsoncpp out to complement the patch above - # fetchpatch2 is not able to handle these renames - mkdir source/thirdparty - mv source/src/json source/thirdparty/jsoncpp + postPatch = '' + # Fix jsoncpp ABI for downstream packages + substituteInPlace CMakeLists.txt \ + --replace-fail "-std=c++11" "-std=c++17" ''; nativeBuildInputs = [