2024-05-22 14:01:06 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
glfw3,
|
|
|
|
pythonOlder,
|
2023-03-17 07:30:30 +00:00
|
|
|
}:
|
2021-09-10 09:22:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "glfw";
|
2024-02-24 23:06:23 +00:00
|
|
|
version = "2.7.0";
|
2023-03-17 07:30:30 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-09-10 09:22:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FlorianRhiem";
|
|
|
|
repo = "pyGLFW";
|
2022-04-09 14:57:47 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-24 23:06:23 +00:00
|
|
|
hash = "sha256-9SNq8jKzgzFzonyMYoyjGbz4NDL83dPKWID9m3HZ7B8=";
|
2021-09-10 09:22:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Patch path to GLFW shared object
|
|
|
|
postPatch = ''
|
2023-11-07 20:04:30 +00:00
|
|
|
substituteInPlace glfw/library.py --replace "_get_library_search_paths()," "[ '${glfw3}/lib' ],"
|
2021-09-10 09:22:52 +00:00
|
|
|
'';
|
2023-03-17 07:30:30 +00:00
|
|
|
|
2024-05-22 14:01:06 +00:00
|
|
|
propagatedBuildInputs = [ glfw3 ];
|
2021-09-10 09:22:52 +00:00
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
2023-03-17 07:28:23 +00:00
|
|
|
|
2024-05-22 14:01:06 +00:00
|
|
|
pythonImportsCheck = [ "glfw" ];
|
2021-09-10 09:22:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for GLFW";
|
|
|
|
homepage = "https://github.com/FlorianRhiem/pyGLFW";
|
2023-03-17 07:28:23 +00:00
|
|
|
changelog = "https://github.com/FlorianRhiem/pyGLFW/blob/v${version}/CHANGELOG.md";
|
2021-09-10 09:22:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.McSinyx ];
|
|
|
|
};
|
|
|
|
}
|