Unverified Commit 1a96d775 authored by Sefa Eyeoglu's avatar Sefa Eyeoglu Committed by GitHub
Browse files

openvr: unbreak jsoncpp abi (#513244)

parents 18ab0dce 3cda8e0a
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -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 = [