Commit e0f9a5b9 authored by sophronesis's avatar sophronesis
Browse files

ultimate-doom-builder: fix render device error by adding missing libraries to wrapper

The package was missing libGL, libpng, and libx11 in the LD_LIBRARY_PATH
wrapper, causing a "Fatal Windows Forms error: Could not create render
device" error when launching the application.

These libraries are already in buildInputs but were not included in the
wrapProgram call. They need to be dynamically loaded by Mono at runtime
for proper OpenGL rendering support.
parent f512d4e6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -92,9 +92,9 @@ stdenv.mkDerivation (finalAttrs: {
    substituteInPlace $out/opt/UltimateDoomBuilder/builder --replace-fail mono ${mono}/bin/mono
    substituteInPlace $out/opt/UltimateDoomBuilder/builder --replace-fail Builder.exe $out/opt/UltimateDoomBuilder/Builder.exe

    # GTK is loaded dynamically by Mono at runtime
    # GTK, OpenGL, and other libraries are loaded dynamically by Mono at runtime
    wrapProgram $out/opt/UltimateDoomBuilder/builder \
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk2-x11 ]}"
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ gtk2-x11 libGL libpng libx11 ]}"

    ln -s $out/opt/UltimateDoomBuilder/builder $out/bin/ultimate-doom-builder