2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
glfw3,
|
|
|
|
pythonOlder,
|
2023-03-24 00:07:29 +00:00
|
|
|
}:
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "glfw";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.7.0";
|
2023-03-24 00:07:29 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
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}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-9SNq8jKzgzFzonyMYoyjGbz4NDL83dPKWID9m3HZ7B8=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Patch path to GLFW shared object
|
|
|
|
postPatch = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
substituteInPlace glfw/library.py --replace "_get_library_search_paths()," "[ '${glfw3}/lib' ],"
|
2021-09-18 10:52:07 +00:00
|
|
|
'';
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ glfw3 ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "glfw" ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for GLFW";
|
|
|
|
homepage = "https://github.com/FlorianRhiem/pyGLFW";
|
2023-03-24 00:07:29 +00:00
|
|
|
changelog = "https://github.com/FlorianRhiem/pyGLFW/blob/v${version}/CHANGELOG.md";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.McSinyx ];
|
|
|
|
};
|
|
|
|
}
|