Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
libGL,
|
|
libX11,
|
|
setuptools,
|
|
glcontext,
|
|
pythonOlder,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "moderngl";
|
|
version = "5.12.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-UpNqmMyy8uHW48sYUospGfaDHn4/kk54i1hzutzlEps=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace _moderngl.py \
|
|
--replace-fail '"libGL.so"' '"${libGL}/lib/libGL.so"' \
|
|
--replace-fail '"libEGL.so"' '"${libGL}/lib/libEGL.so"'
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
buildInputs = [
|
|
libGL
|
|
libX11
|
|
];
|
|
|
|
dependencies = [ glcontext ];
|
|
|
|
# Tests need a display to run.
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "moderngl" ];
|
|
|
|
meta = with lib; {
|
|
description = "High performance rendering for Python";
|
|
homepage = "https://github.com/moderngl/moderngl";
|
|
changelog = "https://github.com/moderngl/moderngl/releases/tag/${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ c0deaddict ];
|
|
# should be mesa.meta.platforms, darwin build breaks.
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|