Commit 1c82291c authored by Thomas Watson's avatar Thomas Watson Committed by github-actions[bot]
Browse files

python3Packages.moderngl: fix context detection under NixOS

In certain situations moderngl will also try to directly load
`libGL.so`/`libEGL.so`, and fail to do so. Substitute a direct path like
in glcontext.

(cherry picked from commit f96b36ba)
parent 3a032358
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,12 @@ buildPythonPackage rec {
    hash = "sha256-UpNqmMyy8uHW48sYUospGfaDHn4/kk54i1hzutzlEps=";
  };

  postPatch = ''
    substituteInPlace _moderngl.py \
      --replace-fail '"libGL.so"' '"${libGL}/lib/libGL.so"' \
      --replace-fail '"libEGL.so"' '"${libGL}/lib/libEGL.so"'
  '';

  build-system = [ setuptools ];

  buildInputs = [