2021-09-18 10:52:07 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, glfw3 }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "glfw";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.5.4";
|
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-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-4Ym3Vmkf+HwORbhR72Ws/cqLkNMPCY8FL35O2hSalGQ=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|