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
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
libGL,
|
|
libX11,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "glcontext";
|
|
version = "3.0.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "moderngl";
|
|
repo = "glcontext";
|
|
tag = version;
|
|
hash = "sha256-GC2sb6xQjg99xLcXSynLOOyyqNwCHZwZqrs9RZh99pY=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
buildInputs = [
|
|
libGL
|
|
libX11
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace glcontext/x11.cpp \
|
|
--replace-fail '"libGL.so"' '"${libGL}/lib/libGL.so"' \
|
|
--replace-fail '"libX11.so"' '"${libX11}/lib/libX11.so"'
|
|
substituteInPlace glcontext/egl.cpp \
|
|
--replace-fail '"libGL.so"' '"${libGL}/lib/libGL.so"' \
|
|
--replace-fail '"libEGL.so"' '"${libGL}/lib/libEGL.so"'
|
|
'';
|
|
|
|
# Tests fail because they try to open display. See
|
|
# https://github.com/NixOS/nixpkgs/pull/121439
|
|
# for details.
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "glcontext" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/moderngl/glcontext";
|
|
description = "OpenGL implementation for ModernGL";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = [ ];
|
|
};
|
|
}
|