python3Packages.moderngl: fix darwin build (#486759)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
@@ -6,6 +7,7 @@
|
||||
libX11,
|
||||
setuptools,
|
||||
glcontext,
|
||||
pkgs,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -18,7 +20,7 @@ buildPythonPackage rec {
|
||||
hash = "sha256-UpNqmMyy8uHW48sYUospGfaDHn4/kk54i1hzutzlEps=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
postPatch = lib.optionalString (stdenv.hostPlatform.isLinux) ''
|
||||
substituteInPlace _moderngl.py \
|
||||
--replace-fail '"libGL.so"' '"${libGL}/lib/libGL.so"' \
|
||||
--replace-fail '"libEGL.so"' '"${libGL}/lib/libEGL.so"'
|
||||
@@ -26,7 +28,7 @@ buildPythonPackage rec {
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
buildInputs = [
|
||||
buildInputs = lib.optionals (stdenv.hostPlatform.isLinux) [
|
||||
libGL
|
||||
libX11
|
||||
];
|
||||
@@ -44,7 +46,6 @@ buildPythonPackage rec {
|
||||
changelog = "https://github.com/moderngl/moderngl/releases/tag/${version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ c0deaddict ];
|
||||
# should be mesa.meta.platforms, darwin build breaks.
|
||||
platforms = lib.platforms.linux;
|
||||
inherit (pkgs.mesa.meta) platforms;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user