Commit d3e5d2db authored by dramforever's avatar dramforever
Browse files

monado: Remove protobuf override for opencv

The override was originally added in #442919 because monado depends on
protobuf through two paths:

- monado -> opencv4 -> protobuf
- monado -> onnxruntime -> protobuf

And since, *at that time*, onnxruntime has protobuf pinned to
protobuf_21, we had to override opencv4 with protobuf_21 as well to
avoid mixing two different versions of protobuf. Otherwise, mayhem
occurs on initialization, manifesting as crashes or deadlocks. This does
not seem to be known when #442919 was written.

With #437307, onnxruntime is no longer pinned to protobuf_21, so the
same mixing problem was introduced back into monado, just the other
direction.

Revert the override for opencv4 to fix it.
parent 051cd4c4
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@
  orc,
  pcre2,
  pkg-config,
  protobuf_21,
  python3,
  SDL2,
  shaderc,
@@ -64,14 +63,7 @@
  serviceSupport ? true,
  tracingSupport ? false,
}:
let
  # For some reason protobuf 32 causes a segfault during startup
  # Pin to last (known) working version
  # See https://github.com/NixOS/nixpkgs/issues/439075
  opencv4' = opencv4.override {
    protobuf = protobuf_21;
  };
in

stdenv.mkDerivation (finalAttrs: {
  pname = "monado";
  version = "25.0.0";
@@ -133,7 +125,7 @@ stdenv.mkDerivation (finalAttrs: {
    libXext
    libXrandr
    onnxruntime
    opencv4'
    opencv4
    openhmd
    openvr
    orc