sweethome3d: fix libGL startup failure
Currently SweetHome3D cannot run on NixOS. It startups with
Profiles [GL4bc, GL3bc, GL2, GLES1] not available on device null
error, and the cause is by inability to find libGL/libEGL.
Add libGL to path to fix this. This also allows to remove MESA override.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
, autoPatchelfHook
|
||||
, libXxf86vm
|
||||
, unzip
|
||||
, libGL
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -75,13 +76,9 @@ let
|
||||
|
||||
cp "${sweethome3dItem}/share/applications/"* $out/share/applications
|
||||
|
||||
# MESA_GL_VERSION_OVERRIDE is needed since the update from MESA 19.3.3 to 20.0.2:
|
||||
# without it a "Profiles [GL4bc, GL3bc, GL2, GLES1] not available on device null"
|
||||
# exception is thrown on startup.
|
||||
# https://discourse.nixos.org/t/glx-not-recognised-after-mesa-update/6753
|
||||
makeWrapper ${jre8}/bin/java $out/bin/$exec \
|
||||
--set MESA_GL_VERSION_OVERRIDE 2.1 \
|
||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
|
||||
--add-flags "-Dsun.java2d.opengl=true -jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"
|
||||
|
||||
|
||||
@@ -102,6 +99,7 @@ let
|
||||
inherit license;
|
||||
maintainers = [ lib.maintainers.edwtjo ];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = exec;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ let
|
||||
inherit license;
|
||||
maintainers = [ lib.maintainers.edwtjo ];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = exec;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user