1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
libGL,
|
|
libX11,
|
|
setuptools,
|
|
glcontext,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "moderngl";
|
|
version = "5.12.0";
|
|
pyproject = true;
|
|
|
|
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 = {
|
|
description = "High performance rendering for Python";
|
|
homepage = "https://github.com/moderngl/moderngl";
|
|
changelog = "https://github.com/moderngl/moderngl/releases/tag/${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ c0deaddict ];
|
|
# should be mesa.meta.platforms, darwin build breaks.
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|