2021-09-18 10:52:07 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, glfw3 }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "glfw";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "2.5.5";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FlorianRhiem";
|
|
|
|
repo = "pyGLFW";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-14 18:05:37 +00:00
|
|
|
sha256 = "sha256-puaKveByAEkgME81uePTMSglvMgyqornW1sNAbJXNuc=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Patch path to GLFW shared object
|
|
|
|
patches = [ ./search-path.patch ];
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace glfw/library.py --replace "@GLFW@" '${glfw3}/lib'
|
|
|
|
'';
|
|
|
|
propagatedBuildInputs = [ glfw3 ];
|
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "glfw" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for GLFW";
|
|
|
|
homepage = "https://github.com/FlorianRhiem/pyGLFW";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.McSinyx ];
|
|
|
|
};
|
|
|
|
}
|