2021-09-18 10:52:07 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, glfw3 }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "glfw";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "2.5.3";
|
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}";
|
|
|
|
sha256 = "sha256-LaK/lYCUN7PDy8QsaGCnQPM1nvQNeBRTdEEkKtaMUHA=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|