2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
glfw,
|
|
|
|
moderngl,
|
|
|
|
numpy,
|
|
|
|
pillow,
|
|
|
|
pygame,
|
|
|
|
pyglet,
|
|
|
|
pyqt5,
|
|
|
|
pyrr,
|
|
|
|
pysdl2,
|
|
|
|
pyside2,
|
|
|
|
pythonOlder,
|
|
|
|
scipy,
|
|
|
|
trimesh,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-08-04 22:07:22 +00:00
|
|
|
pname = "moderngl-window";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.4.6";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "moderngl";
|
2023-08-04 22:07:22 +00:00
|
|
|
repo = "moderngl_window";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-zTygSXU/vQZaFCuHbRBpO9/BYYA2UOid+wvhyc2bWMI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "pillow" ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
moderngl
|
|
|
|
pyglet
|
|
|
|
pillow
|
|
|
|
pyrr
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
trimesh = [
|
|
|
|
trimesh
|
|
|
|
scipy
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
glfw = [ glfw ];
|
|
|
|
pygame = [ pygame ];
|
|
|
|
PySDL2 = [ pysdl2 ];
|
|
|
|
PySide2 = [ pyside2 ];
|
|
|
|
pyqt5 = [ pyqt5 ];
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Tests need a display to run.
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "moderngl_window" ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Cross platform helper library for ModernGL making window creation and resource loading simple";
|
2023-08-22 20:05:09 +00:00
|
|
|
homepage = "https://github.com/moderngl/moderngl-window";
|
|
|
|
changelog = "https://github.com/moderngl/moderngl-window/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ c0deaddict ];
|
2023-08-22 20:05:09 +00:00
|
|
|
platforms = platforms.mesaPlatforms;
|
2023-11-16 04:20:00 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|