about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-06-05 12:09:18 +0300
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-06-05 12:09:18 +0300
commit522463b4f22f04ee870cff8b8eb1c80b0ae3b6a9 (patch)
tree92c31f1d8506e222162927f0aba5427643a226c7
parent8f9be47422c75e65b2fa701fec5355697a524ff1 (diff)
python310Packages.pyopengl: unbreak on darwin
-rw-r--r--pkgs/development/python-modules/pyopengl/default.nix7
1 files changed, 2 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/pyopengl/default.nix b/pkgs/development/python-modules/pyopengl/default.nix
index ecc0e307e7f31..94b5d38d3fc8a 100644
--- a/pkgs/development/python-modules/pyopengl/default.nix
+++ b/pkgs/development/python-modules/pyopengl/default.nix
@@ -18,17 +18,14 @@ buildPythonPackage rec {
   propagatedBuildInputs = [ pillow ];
 
   patchPhase = let
-    ext = stdenv.hostPlatform.extensions.sharedLibrary; in ''
+    ext = stdenv.hostPlatform.extensions.sharedLibrary; in lib.optionalString (!stdenv.isDarwin) ''
     # Theses lines are patching the name of dynamic libraries
     # so pyopengl can find them at runtime.
     substituteInPlace OpenGL/platform/glx.py \
       --replace "'GL'" "'${pkgs.libGL}/lib/libGL${ext}'" \
       --replace "'GLU'" "'${pkgs.libGLU}/lib/libGLU${ext}'" \
       --replace "'glut'" "'${pkgs.freeglut}/lib/libglut${ext}'"
-    substituteInPlace OpenGL/platform/darwin.py \
-      --replace "'OpenGL'" "'${pkgs.libGL}/lib/libGL${ext}'" \
-      --replace "'GLUT'" "'${pkgs.freeglut}/lib/libglut${ext}'"
-
+  '' + ''
     # https://github.com/NixOS/nixpkgs/issues/76822
     # pyopengl introduced a new "robust" way of loading libraries in 3.1.4.
     # The later patch of the filepath does not work anymore because