2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
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";
|
|
|
|
version = "2.4.4";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
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-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-mg3j5ZoMwdk39L5xjcoEJo9buqssM1VLJtndSFsuCB0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
broken = versionAtLeast pillow.version "2" || stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|