summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlois Wohlschlager <alois1@gmx-topmail.de>2023-08-10 19:12:49 +0200
committerAlois Wohlschlager <alois1@gmx-topmail.de>2023-08-10 19:12:49 +0200
commit12470428371756f09db4e8d243d7adb8c025ab83 (patch)
treeabbe5b1076dbbd0368b6c2b3e12df74d903a6818
parentocamlPackages.mirage-clock: 3.1.0 → 4.2.0 (diff)
downloadnixpkgs-12470428371756f09db4e8d243d7adb8c025ab83.tar.gz
geogebra: Fix 3D view
Fixes: https://github.com/NixOS/nixpkgs/issues/217855
-rw-r--r--pkgs/applications/science/math/geogebra/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/applications/science/math/geogebra/default.nix b/pkgs/applications/science/math/geogebra/default.nix
index e9e309f421a0..f4c6e724270d 100644
--- a/pkgs/applications/science/math/geogebra/default.nix
+++ b/pkgs/applications/science/math/geogebra/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, jre, makeDesktopItem, makeWrapper, unzip, language ? "en_US" }:
+{ lib, stdenv, fetchurl, xorg, jre, makeDesktopItem, makeWrapper, unzip, language ? "en_US" }:
let
pname = "geogebra";
version = "5-0-785-0";
@@ -55,7 +55,11 @@ let
installPhase = ''
install -D geogebra/* -t "$out/libexec/geogebra/"
+ # The bundled jogl (required for 3D graphics) links to libXxf86vm
+ # OpenGL versions newer than 3.0 cause "javax.media.opengl.GLException: Not a GL2 implementation"
makeWrapper "$out/libexec/geogebra/geogebra" "$out/bin/geogebra" \
+ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm ]}" \
+ --set MESA_GL_VERSION_OVERRIDE 3.0 \
--set JAVACMD "${jre}/bin/java" \
--set GG_PATH "$out/libexec/geogebra" \
--add-flags "--language=${language}"