2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-01-25 14:12:00 +00:00
|
|
|
, pythonRelaxDepsHook
|
2023-11-16 04:20:00 +00:00
|
|
|
, setuptools
|
2023-08-22 20:05:09 +00:00
|
|
|
, glfw
|
2020-04-24 23:36:52 +00:00
|
|
|
, moderngl
|
2023-08-22 20:05:09 +00:00
|
|
|
, numpy
|
2020-04-24 23:36:52 +00:00
|
|
|
, pillow
|
2023-08-22 20:05:09 +00:00
|
|
|
, pygame
|
|
|
|
, pyglet
|
|
|
|
, pyqt5
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyrr
|
2023-08-22 20:05:09 +00:00
|
|
|
, 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";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.4.5";
|
|
|
|
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}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-OfvIxezeZyuv5LLbe+4o1X2UCGnXT2DNvAF7t2Isw6Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"pillow"
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonRelaxDepsHook
|
2023-11-16 04:20:00 +00:00
|
|
|
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
|
|
|
|
];
|
|
|
|
glfw = [
|
|
|
|
glfw
|
|
|
|
];
|
|
|
|
pygame = [
|
|
|
|
pygame
|
|
|
|
];
|
|
|
|
PySDL2 = [
|
|
|
|
pysdl2
|
|
|
|
];
|
|
|
|
PySide2 = [
|
|
|
|
pyside2
|
|
|
|
];
|
|
|
|
pyqt5 = [
|
|
|
|
pyqt5
|
|
|
|
];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Tests need a display to run.
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-08-22 20:05:09 +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
|
|
|
};
|
|
|
|
}
|