2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, libGL
|
|
|
|
, libX11
|
2021-05-20 23:08:51 +00:00
|
|
|
, glcontext
|
2022-10-30 15:09:59 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "moderngl";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "5.8.2";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-30 22:05:00 +00:00
|
|
|
hash = "sha256-tmwY1/SrepS+P5655MpoNurR2lAtYugbf3pIFQ4u05E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = [
|
|
|
|
libGL
|
|
|
|
libX11
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
glcontext
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Tests need a display to run.
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"moderngl"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-10-30 15:09:59 +00:00
|
|
|
description = "High performance rendering for Python";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/moderngl/moderngl";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/moderngl/moderngl/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ c0deaddict ];
|
2022-10-30 15:09:59 +00:00
|
|
|
# should be mesaPlatforms, darwin build breaks.
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|